Error while trying to use Stored Procedure and Dis

Results 1 to 2 of 2

Thread: Error while trying to use Stored Procedure and Dis

  1. #1
    BotchedDB Guest

    Default Error while trying to use Stored Procedure and Dis

    I receive an error from OLEDB whenever I try to run a stored procedure. I used a login that I know works. I used SQL Server Query Analyzer to request all the information from the tables and everything was successful. I also used it to execute the stored procedure using the same login and it returned the correct results without errors.<BR><BR>The error happens when I try to run a vbs file. Here is the code<BR><BR>====================================== =====<BR>Dim adoConn, adoCom,adoRec, tmpRec<BR> <BR>Set adoConn = WScript.CreateObject("ADODB.Connection")<BR>adoCon n.Open "Network Library=DBMSSOCN; Provider=sqloledb.1;Data Source=XX;Initial Catalog=XX;User Id=XX;Password=XX;"<BR> <BR>Set adoCom = WScript.CreateObject("ADODB.Command")<BR>adoCom.Co mmandType = 4 &#039; adCmdStoredProc<BR>adoCom.CommandText = "sp_XXX"<BR><BR>Set adoRec = WScript.CreateObject("ADODB.Recordset")<BR>adoRec. CursorLocation = 3 &#039; adUseClient<BR>set adoCom.ActiveConnection = adoConn<BR><BR>adoRec.Open adoCom, , 3, 1 &#039;&#060;--- This is where the error occurs<BR>Set tmpRec = adoRec<BR>Set adoRec.ActiveConnection = Nothing<BR>Set adoRec = Nothing<BR>Set adoCom = Nothing<BR>adoConn.Close<BR>Set adoConn = Nothing<BR>&#039;return tmpRec<BR>set tmpRec = nothing

  2. #2
    BotchedDB Guest

    Default RE: Error while trying to use Stored Procedure and

    &#060;Apology&#062;<BR>The error I receive is Syntax Error or Access Violation<BR>&#060;/Apology&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts