Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link Page To Access Table 1

Status
Not open for further replies.

rookery

Programmer
Apr 4, 2002
384
GB
I'm an Access/SQL developer and have no idea about HTML or other web technologies and I've been asked to do a one-off job which is relinking this simple web page to the new SQL server database.

Can anyone tell me where to even begin?
 
If you mean that you need a webpage to display information stored in an SQL database then you will need to know some kind of server scripting language. Either ASP, PHP or ColdFusion.

Can you define the question/requirement more clearly?

 
Thanks for your reply Foamcow.

Its a very simple webpage that currently connects to an Access database. I need to change the connection so that it's pointing at the new SQL DB.

I know where the source code is to be found but I'm not sure whereabouts in there is the connection string info.

Hope this makes things a little clearer.
 
Unfortunately there are a number of ways this can be done.

It is possible to connect to Access databases, for example, via a DSN or a DSNless connection!

Can you post the code and we can try to help?

 
This is a portion of the code found at the top of the source code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Dummy Version 1.0 Search</title>
<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content=" name="vs_targetSchema">
</HEAD>
<body>

Is the connection string info in here? I cant see it.
 
this is the connection string
Code:
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open ("DRIVER={MICROSOFT ACCESS DRIVER (*.mdb)};DBQ=c:\inetpub\wwwroot\database.mdb;")
this would be used on an ASP page using VB Script.

Glen
 
Glen if I go to View/Source on my web page I cant see anything like that in there at all.

Am I looking in the wrong place?
 
You wont see it if you select "View Source" as the script is run server side and the resulting HTML output is what gets sent to your browser.

You will need to look at the original source file in a text editor to see the Server Side stuff.

 
I know this may seem like a silly question but where would I find the original source file?

This facility was developed by a different company. Would it be with them or the client?
 
The only place I can say for sure that it is, is on your webserver.
Other than that, it depends on your filing system.

FTP to the webserver and get the whole site from there. Then look at/modify that.

 
Perhaps some furhter explanation might help.

Web browsers generally read and render HTML.
This is what gives you the page you see.

There are different ways that this HTML can reach the browser.
Your browser requests a document from a web server. Which is then sent to your browser and displayed accordingly.
Your browser may be requesting a "hard coded" HTML page, where the author has marked up his document with HTML tags.
It is possible for an HTML page to have particular scripts built in alongside the HTML. These scripts are processed by the webserver. The scripts may do something like connect to a database and retrieve a recordset. The data in the recordset is then "marked up" with HTML tags for the browser to display. All this happens BEFORE the page is sent to your browser. Hence you never see the Server Side Scripts, just the resulting HTML.

Consequently, to change any characteristic of the scripts you need to be working with the original file as is sitting on the web server.

 
Foamcow I think the penny has finally dropped!!

Thanks for your patience and help on this matter.
 
...and I thought I had this down!
I have a web.config page. In this is the following code:

<add key="OLEDBCONN1STR" value="Provider=Microsoft.Jet.OLEDB.4.0;Password=a;User ID=user1;Data Source=\\servername\folder\XXX294.mdb;Jet OLEDB:System Database=\\servername\folder\security.mdw;" />

Is it this that i need to amend to connect to the SQL db? If so what parameters must I specify?
 
You'll probably get quicker, more accurate help in forum333. It's dedicated to "Microsoft: Active Server Pages (ASP) Forum".

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top