|
-
Jan 7th, 2001, 10:05 AM
#1
Thread Starter
New Member
Hi,
I installed SQL 7.0 on Win2000, and I coded a client program that used RDS to access Database.
For example:
dim rdso as RDS.DataControl
dim rs as ADODB.Recordset
......
Set rdso = New RDS.DataControl
'connecting to database
SQLStatement = "select * from cUser"
'SetCoonect is the sub procedure that I coded
SetConnect rdso, SQLStatement
rdso.Refresh
sub rdso_OnRedayStatusChanged()
On Error Resume Next
If rdso.ReadyState = adcReadyStateComplete _
Or rdso.ReadyState = adcReadyStateInteractive Then
Set rs = rdso.Recordset
If rs.State = adStateClosed Then
MsgBox "Errot(Func. rdsoForUser_onreadystatechange())", , "Error"
Else
CheckUser rs 'identify user
End If
End If
end sub
----------------------
SetConnect
----------------------
Public Sub SetConnect(rdso As RDS.DataControl, ByVal SQLStatement As String)
Dim strServer As String, strConnection As String
Dim fso As New FileSystemObject
Dim fp1 As TextStream, fp2 As TextStream
'Check connecting configuration
If fso.FileExists(App.Path & "\Connection.cfg") Then
Set fp1 = fso.OpenTextFile(App.Path & "\Connection.cfg")
Else
Set fp2 = fso.CreateTextFile(App.Path & "\Connection.cfg")
fp2.WriteLine "http://xxx.xxx.xxx.xxx"
fp2.WriteLine "Provider=SQLOLEDB; USER ID=sa; password=; Initial Catalog=xxx;Data Source=xxx"
Set fp1 = fso.OpenTextFile(App.Path & "\Connection.cfg")
End If
strServer = fp1.ReadLine
strConnection = fp1.ReadLine
'Connecting to server
rdso.Server = strServer
rdso.Connect = strConnection
'Setting the fectch propertities
rdso.SQL = SQLStatement
rdso.ExecuteOptions = adcExecAsync
rdso.FetchOptions = adcFetchBackground
But the problem happened!
while the rdso exectuting 'refresh' action, a message was prompt:
Run time error: -2147024891 (80070005)
..........
The summary of the message told me that RDS has not right to access the IIS 5.0 in Win2000.
But, If I connect to Nt 4.0 with pack 6a, it did work!!! I can easily retrieve any data by executing SQL statement.
Could any one tell why? By the way, would you please mail the solution to my email box? Greatful appreciation!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|