HOWTO: Using the RDS DataFactory via Standard ADO Open MethodID: Q183628
|
RDS (Remote Data Service for ADO), is tightly integrated with ActiveX Data
Objects (ADO), and is included in the Microsoft Data Access Components
(MDAC). MDAC can be downloaded from the following Web site:
http://www.microsoft.com/data
Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
rs.Open "Select * from Products", _
"Provider=MS Remote;Remote Server=http://ServerXX;DSN=Advworks"
While Not rs.EOF
MSFlexGrid1.AddItem rs(0) & vbTab & rs(1)
rs.MoveNext
Wend
End Sub
The preceding sample code uses the Advworks DSN that uses the Microsoft
Access driver to access the Advworks database that installs with the
MDAC components. The MDAC installation at times has problems creating
the DSN correctly.
If the following error occurs remove the Advworks DSN and recreate the
DSN through the ODBC Data Source Administrator located in Control Panel:The Advworks Microsoft Access database is located in:Run-time error -2147467259(80004005) General Error Unable to Open registry key DriverID.
C:\Program Files\Common Files\System\MSadc\Samples\Advworks.mdb
For additional information, please see the following Web site:
http://www.microsoft.com/data/rds/
Additional query words: kbdse
Keywords : kbADO150 kbADO200 kbRDS150 kbRDS200
Version : WINDOWS:1.5
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: February 11, 1999