Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Visual Basic and RDS (access + SQL)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Visual Basic and RDS (access + SQL)

 Post Reply Post Reply
Author
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Topic: Visual Basic and RDS (access + SQL)
    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!

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.....

Back to Top
mpreuett View Drop Down
Newbie
Newbie
Avatar

Joined: 29 July 2002
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote mpreuett Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2003 at 2:32pm

Here you go...

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

or

http://www.rdsdeveloper.com/

FYI:  Microsoft Considers RDS to be obsolete.

Have you looked at remote scripting?

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.