Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    4

    Unanswered: Error on SQL when Executing a SQL statement

    When i try to execute my SQL statement i get the following;

    Run-time error '-2147467259 (80004005)': CWBDB0036 - Server returned SQL error.

    H E L P.....

    Below is the example i am attempting to get working:

    Dim cnTCPASM05 As New ADODB.Connection
    Dim cm_APILIB_Parts As New ADODB.Command
    Dim cm_APILIB_SPROC2 As New ADODB.Command
    Dim rs_APILIB_SPROC2 As New ADODB.Recordset
    Dim rs_APILIB_PARTSDATA As ADODB.Recordset

    cnTCPASM05.Open "Provider=IBMDA400;" & _
    "Data source=s103c08m;" & _
    "Password=????;" & _
    "User Id=????"

    Set cm_APILIB_Parts.ActiveConnection = cnTCPASM05

    cm_APILIB_Parts.CommandText = "Select * From DMSFILES.Jtpceqm Order By Brcode"

    cm_APILIB_Parts.CommandType = adCmdText
    Set rs_APILIB_PARTSDATA = cm_APILIB_Parts.Execute

    The error happens in the line above.......This code is from IBM's Redbook with the exception of file names and libraries.



    Thanks fvlmasl2
    Last edited by fvlmasl2; 02-16-05 at 20:33.

  2. #2
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    Dim cnTCPASM05 As New ADODB.Connection
    Dim cm_APILIB_Parts As New ADODB.Command
    Dim cm_APILIB_SPROC2 As New ADODB.Command
    Dim rs_APILIB_SPROC2 As New ADODB.Recordset
    Dim rs_APILIB_PARTSDATA As ADODB.Recordset

    cnTCPASM05.Open "Provider=IBMDA400;" & _
    "Data source=s103c08m;" & _
    "Password=????;" & _
    "User Id=????"
    ' Try to add this line below
    Set rs_APILIB_PARTSDATA =new ADODB.Recordset

    Set cm_APILIB_Parts.ActiveConnection = cnTCPASM05

    cm_APILIB_Parts.CommandText = "Select * From DMSFILES.Jtpceqm Order By Brcode"

    cm_APILIB_Parts.CommandType = adCmdText
    Set rs_APILIB_PARTSDATA = cm_APILIB_Parts.Execute

  3. #3
    Join Date
    Feb 2005
    Posts
    4
    I get the same error on the execute. What am i missing? Could i be missing something? What do i need on the 400? what components do i need on the pc? ODBC..........

    This is getting very frustrating, I have been wrestling with this for a few days now.

    H E L P.....seriously, thanks for the help......


    fvlmasl2

Posting Permissions

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