|
-
May 1st, 2002, 10:08 AM
#1
Thread Starter
Hyperactive Member
Beginner. connect to an Access DB on server
OK I am a beginner to this ASP stuff. I have tried more than a hand full of tutorials (all to long and confussing) on connecting to a db on a server using ASP pages and all I get is ODBC errors and stuff like that. Can anyone tell me how I can connect to the DB using HTML and ASP? I set my IIS to except Scripting and wirting to the directory.
I want to start off just connecting and looking at one field then once I get that down I will add more fields and add writing to them but for now I just want to connect. My db name is (Action RequestCon.mdb) and the table I want to look at is Userinfo an the field is Name. Any help would be greatly appreciated
-Troy
-
May 1st, 2002, 12:36 PM
#2
Addicted Member
<code>
dim dbConn
strSQL = "SELECT * FROM "Name of table"
Set dbConn = Server.CreateObject("ADODB.Connection")
SET rsOptions = Server.CreateObject ("ADODB.Recordset")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Action RequestCon.mdb"
dbConn.Open strConnect
rsOptions.Open strSQL, dbConn
</code>
Hope this helps
-
May 1st, 2002, 12:40 PM
#3
Addicted Member
To be more specific on this line just type
strSQL = "SELECT * FROM Userinfo where name=" Whatever
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|