-
Some time, some NOT, wired behavior (LINKED SERVER) !!!
I wrote a stored procedure for creating "LINKED SERVER" to MS-ACCESS and it works fine most of the time BUT when today i try to run it gives me this
error, every thing is same as I use to run, I wonder whats wrong, anybody have face the same problem b4
?lErrNo -2147217900
?sErrMsg - [Microsoft][ODBC SQL Server Driver][SQL Server]Server added.
After that error it quite the applicaiton.
NOTE: I'm calling SP from VB6:
-------------------------------------------------
On Error GoTo ErrorHandler
Dim oCmd As ADODB.Command
Dim lRecordsAffected As Long
Dim sReturnValue
'Get Path
KeyValue = LoadINI("Source", "REAAASP_PUA26"
' Create a new Command
Set oCmd = New ADODB.Command
With oCmd
.CommandTimeout = 600
.CommandType = adCmdStoredProc
.CommandText = "REAAASP_PUA26"
Set .ActiveConnection = oConn
'Create the Command's Parameters and set their values
.Parameters.Append .CreateParameter(ppath, adVarChar, adParamInput, 1000, KeyValue)
.Parameters.Append .CreateParameter("ValOutPut", adVarChar, adParamReturnValue, 100)
.Execute lRecordsAffected ' Do not return a recordset
'Print the number of records affected and new identity value
sReturnValue = .Parameters("ValOutPut".Value ' New Identity
If sReturnValue Then
ListStatus.ForeColor = &H8000&
ListStatus.AddItem "REAAASP_PUA26 is succussful - " & sReturnValue
Else
ListStatus.ForeColor = 255
ListStatus.AddItem "REAAASP_PUA26 is failed - " & sReturnValue
End If
End With
ErrorHandler:
Dim sErrMsg As String
Dim sErrSource As String
Dim lErrNo As Long
lErrNo = Err.Number
sErrMsg = Err.Description
If sErrMsg = "" Then
Else
ListStatus.AddItem sErrMsg
End If
If sReturnValue = "" Then
ListStatus.ForeColor = 255
ListStatus.AddItem "REAAASP_PUA26 is un-Succussful - " & sReturnValue
End If
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
|
|