Forum Moderators: open

Message Too Old, No Replies

How to use “RDS.Connect” to connect to a MS Access database?

         

SpyderWeb

10:47 pm on Aug 2, 2004 (gmt 0)

10+ Year Member



The example I am working from uses the following code which does not work:
RDS.Connect = "Provider='sqloledb';Integrated Security='SSPI';Initial

So I tried the following, but still no go. Any help would be greatly appreciated!
Thanks in advance,
Stephen

dim conn
dim strconn

strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & _
Server.MapPath("/fpdb/users.mdb")

set conn = server.createobject("adodb.connection")
conn.open strconn

'Create the recordset object
set rs = server.createobject("adodb.recordset")
rs.open "my_users", conn, 2, 2

'set RDS properties for control just created
RDS.Server = "http://<%=Request.ServerVariables("SERVER_NAME")%>"
RDS.Connect = conn
RDS.SQL = "Select * from my_users"
RDS.Refresh

mattglet

11:53 am on Aug 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not too familiar with RDS, but don't you have to create the RDS object in order to use it?

What is the error you are getting?

Set RDS = Server.CreateObject ("RDS.DataControl")

Here's a link I quickly found: http://msdn.microsoft.com/library/en-us/ado270/htm/mdhowrdstutorialvbscript.asp [msdn.microsoft.com]