Hi,
I tried to run a query against a MS Access database with RDS in VB via
a DSN 'REMOTE_U' on Windows 2003 and getting the following error:
[Microsoft][ODBC Microsoft Access Driver]Invalid SQL Statement;
expected 'DELETE','INSERT','PROCEDURE','SELECT' or 'UPDATE'.
I have configured the MDAC 'Directory Security' and set the
following in msdfmap.ini
[connect default]
Access=ReadWrite
Also I configure MDAC virtual directory in IIS and given proper permission
for IUSR_Machine name.
Also setup the registry entries ADCLaunch\Parameters\RDSServer.DataFactory
&
AdavacedServerFactory
an example of the same VB code that is enclosed in the bottom part of
this
submission.
As the SQL statement is so simple I can't see why should it be
an invalid statement. I guess there must be some setup related
problem in my environment.
Dim rs As Object 'Recordset
Dim ds As Object 'RDS.DataSpace
Dim df As Object 'RDSServer.DataFactory
Private Sub Form_Load()
Set ds = CreateObject("RDS.DataSpace")
Set df = ds.CreateObject("RDSServer.DataFactory", _
http://myserver)
End Sub
Private Sub Command1_Click()
'This query returns a recordset over HTTP.
Dim strCn As Variant, strSQL As Variant
strCn = "dsn=REMOTE_U;uid=Admin;pwd="
strSQL = "SELECT * from test1"
Set rs = df.Query (strCn, strSQL)
End Sub
I will appreciate if somebody can help me to solve this issue.
With regards
Satheesh Kumar


|