Print Page | Close Window

Visual Basic and RDS (access + SQL)

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=1348
Printed Date: 29 March 2026 at 9:19am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Visual Basic and RDS (access + SQL)
Posted By: Gullanian
Subject: Visual Basic and RDS (access + SQL)
Date Posted: 25 March 2003 at 5:13pm

Hi folks!  Im trying to connect to an access database using RDS, anyone got a tutorial on how to do this?  I seem to be getting handler errors, etc etc.

Id like to know how to connect to a remote access and SQL database in visual basic, thanks very much if you can help me!




Replies:
Posted By: Gullanian
Date Posted: 30 March 2003 at 11:14am

Plz can anyone help me out here :)

Ive posted all over the net, no one seems to know!  Dont let me down webwiz'oholics!



Posted By: Gullanian
Date Posted: 30 March 2003 at 11:15am

If anyone knows VB heres my code to test the connection:

Private Sub btn_test_Click()
    'Create new variables
    Dim str_db_path As String       'Holds database path
    Dim str_db_username As String   'Holds database username
    Dim str_db_password As String   'Holds database password
    Dim str_connection As String    'Holds connection string for DB
    Dim rs As Object                'Recordset
    Dim ds As Object                'RDS.DataSpace
    Dim df As Object                'RDSServer.DataFactory
    Dim strCn As Variant            'Connection string
    Dim strSQL As Variant           'SQL string

    'Grab values from form
    str_db_path = txt_db_path.Text
    str_db_username = txt_db_username.Text
    str_db_password = txt_db_password.Text
   
    'Replace harmful quotations
    str_db_path = Replace(str_db_path, "'", "''")
    str_db_username = Replace(str_db_username, "'", "''")
    str_db_password = Replace(str_db_password, "'", "''")

    Set ds = CreateObject("RDS.DataSpace")
    Set df = ds.CreateObject("RDSServer.DataFactory", str_db_path)
   
    strCn = "dsn=pubs;uid='" & str_db_username & "';pwd='" & str_db_password & "'"
    strSQL = "select * from tbl_operators"
    Set rs = df.Query(strCn, strSQL)
   
    'Open new recordset
    Set rst_common = New ADODB.Recordset
End Sub

Comes up with a handler error.....



Posted By: mpreuett
Date Posted: 11 April 2003 at 2:32pm

Here you go...

http://www.able-consulting.com/RDS25.htm - http://www.able-consulting.com/RDS25.htm

or

http://www.rdsdeveloper.com/ - http://www.rdsdeveloper.com/

FYI:  Microsoft Considers RDS to be obsolete.

Have you looked at remote scripting?

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net