Re: VB6-ADO-COM-ODBC-INFORMIX : Problem running query. SQL State 37000

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 10/21/04

  • Next message: William \(Bill\) Vaughn: "Re: Exporting from SQL 6.7 to SQL 2000"
    Date: Thu, 21 Oct 2004 11:39:13 -0700
    
    

    Ah, is TestData2 a column? You didn't include it in the SELECT. Is it a
    TextBox that contains the column to sort on?

    -- 
    ____________________________________
    William (Bill) Vaughn
    Author, Mentor, Consultant
    Microsoft MVP
    www.betav.com
    Please reply only to the newsgroup so that others can benefit.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    __________________________________
    "rmsterling" <rmsterling@avaya.com> wrote in message 
    news:83F560BE-5F3A-4BA4-87A5-1D6E53F26C59@microsoft.com...
    >
    > Problem running SELECT SQL query....
    >
    > Using....
    >  Visual Basic 6.0 SP5
    >  ADO COM Object
    >  Using ODBC
    >  MDAC 2.8 Installed
    >  Connecting to a Informix 7.3 Database located on a Unix Server.
    >
    > Connection statement below connects the database with no problems.....
    >
    >    sConnectStr = "DSN=testname;UID=testuser;PWD=testpwd"
    >    With gadoConnection_Test
    >        .CursorLocation = adUseServer
    >        .Provider = "MSDASQL"
    >        .ConnectionString = sConnectStr
    >        .CommandTimeout = 300
    >        .Open
    >    End With
    >
    > When I go to execute a query .....
    >
    >
    >    gsSQL = "SELECT testdata FROM testtable WHERE testdata='TEST' ORDER BY
    > testdata2;"
    >    adoRS_Test.Open gsSQL, gadoConnection_Test, adOpenDynamic, 
    > adLockReadOnly
    >    If Not adoRS_Test.BOF Then
    >
    > Above query produces this error....
    >
    >  Error : -2147217900.
    >  Native Error : 0.
    >  SQL State : 37000.
    >  Source : Microsoft OLE DB Provider for ODBC Drivers.
    >  Description : [OpenLink][ODBC][Driver]Syntax error or access violation.
    >
    > Tried running query through the ODBC layer in Access 2003 and the Query
    > executes fine.
    >
    > I think the problem lies in the statement below which tells VB what ODBC
    > driver to use....
    >
    >        .Provider = "MSDASQL"
    >
    > ODBC Driver details are below....
    >
    > OpenLink Generic ODBC Driver
    > 5.10.00.00
    > OpenLink Software
    > OLOD5032.DLL
    > 18Sep2003
    >
    > Could you tell me what I place in the .Provider property to make my
    > application work?
    >
    > -- 
    > ----------------------------
    > Regards,
    > Richard Sterling
    > Senior Software Engineer Tel : +44 (0)1707 392200 ext 4815
    > Avaya ECS Ltd, United Kingdom
    > mailto:rmsterling@avaya.com 
    

  • Next message: William \(Bill\) Vaughn: "Re: Exporting from SQL 6.7 to SQL 2000"

    Relevant Pages

    • Re: MS SQL Server/ODBC package for Python
      ... Running your benchmark, I ran into a couple of interesting points. ... I changed the query to ... If adodbapi avoids this (which we'll also integrate into mxODBC 2.1), then this would explain the differences you see. ... ODBC driver doesn't provide proper size information - each ...
      (comp.lang.python)
    • Re: ODBC driver manager mangles delimited column names
      ... Thanks Robert, I'm beginning to think you are right. ... I've just finished running some more tests with the trace logging turned on for the ODBC driver manager. ... This is what I get in the log for the automatically generated query: ...
      (microsoft.public.data.odbc)
    • Re: Accessing a paradox table from a C# application...
      ... SELECT TOP 1 * FROM ModelSer ORDER BY Timestamp ... How much faster is the query if you strip off the PX? ... The ODBC driver that I am using is the Microsoft Paradox ...
      (comp.databases.paradox)
    • Re: Informix+ODBC+ADO.NET - problem
      ... It is hard for me to imagine why any problem with a select query would ... the ODBC driver and your application is assuming that whatever went ... wrong was the same as a dead connection. ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: ODBC parameter query
      ... connecting to thru the ODBC driver, and the type of connection you're ... It sounds like you're using SQL pass-thru queries, ... Then use the query. ... > I have a set of foreign tables to query through a third party ODBC driver. ...
      (microsoft.public.access.queries)