We help IT Professionals succeed at work.

CONVERT PB APP FROM ASA TO SQL SERVER 2000

pemurray
pemurray asked
on
848 Views
Last Modified: 2013-12-26
Okay, so I get all done with my app and then someone wants to move it onto SQL Server 2000 (Sorry Sybase).

I use PowerDesigner, re-generate the tables, create an odbc connection to the database and update the open even of the application.  Basically, it seems to work!!

But in that nasty date oriented query that Namasi was helping me with, I am getting SQL STATE 37000 errors:

I was using DATE which is not supported by SQL Server.

I changed the retrieval arguments from DATE to DATETIME.
I changed the variable in the script from a DATE to DATETIME.
I even changed the editmask controls from a DATEMASK! to DATETIMEMASK!

When I go into the datawindow and manually enter the query arguments, the dw works fine.  But I am still having trouble running the app.

Here is where I currently am with the code:

Any help would be greatly appreciated.

Best regards,

Paul

int inprocess_int
int onhold_int
int targeted_int
int completed_int

string inprocess
      if cbx_inprocess.checked then
            inprocess = "In Process"
            if (inprocess="") then
                  inprocess_int = 0
            else
                  inprocess_int = 1
            end if
      end if
      
string onhold
      if cbx_onhold.checked then
            onhold = "On Hold"
            if (onhold="") then
                  onhold_int = 0
            else
                  onhold_int = 1
            end if
      end if
      
string targeted
      if cbx_targeted.checked then
            targeted = "Targeted"
            if (targeted="") then
                  targeted_int = 0
            else
                  targeted_int = 1
            end if
      end if
      
string completed
      if cbx_completed.checked then
            completed = "Completed"
            if (completed="") then
                  completed_int = 0
            else
                  completed_int = 1
            end if
      end if

if (inprocess_int + onhold_int + targeted_int + completed_int = 0) then
      messagebox("Error!","You must select at least one Status Option")
      return 1
end if
      
datetime startdate
datetime enddate

em_start_date.GetData(startdate)
messagebox("GetData Results:Start Date",string(startdate))

em_end_date.GetData(enddate)
messagebox("GetData Results:End Date",string(enddate))

if (date(enddate) <= date(startdate)) then
      messagebox("Error!","End Date cannot be equal to or less than Start Date.")
end if

dw_1.retrieve(inprocess,onhold,targeted,completed,startdate,enddate)

Comment
Watch Question

HI Paul,

This may be of some help : ( from PB Help)

Date column types:  If you define a DataWindow with a column of type Date and deploy it with a DBMS that uses the DateTime data type, set the StaticBind DBParm parameter to 0 or No. This forces PowerBuilder to get a result set description before retrieving data and adjust the bind information if necessary.

For more information, see the StaticBind DBParm parameter in the online Help.

Regards,
Vikas D.

Author

Commented:
Vikas,

Thank you for your suggestion.

I changed the Connect string to:

SQLCA.DBParm="Connectstring='DSN=GT3-IMTRAK;StaticBind = 0'"

But I get the same error.

Thanks again.'

Paul

Author

Commented:
Also,

The exact same datawindow works fine when I delete the retrieval arguments.

Paul

Author

Commented:
Okay, I guess that i have figured out that it is not a date thing.  The query works without query arguments.  And does not work with ANY retrieval arguments.  NOT EVEN A STRING.

Here is the current select statement.  I temporarily removed the date arguments.

 SELECT DISTINCT company.c_company,  
         agency.a_agency_name,  
         service_provider.sp_company_name,  
         service_provider.sp_trained,  
         service_provider.sp_rate_load_method,  
         service_provider.sp_rates_received,  
         service_provider.sp_rates_loaded,  
         company.c_estimated_yr_trans,  
         service_provider.sp_on_saturn,  
         service_provider.sp_backoffice,  
         agency.a_channel,  
         agency.a_forms_sent,  
         agency.a_forms_returned,  
         agency.a_script_created,  
         agency.a_agency_trained,  
         company.c_effort_status,  
         agency.a_standard_profiles,  
         agency.a_multi_account,  
         agency.a_special_environment,  
         company.c_target_impl_date  
    FROM {oj agency RIGHT OUTER JOIN company ON agency.effort_id = company.effort_id LEFT OUTER JOIN service_provider ON company.effort_id = service_provider.effort_id}  
   WHERE ( company.c_effort_status = :inprocess ) OR  
         ( company.c_effort_status = :onhold ) OR  
         ( company.c_effort_status = :targeted ) OR  
         ( company.c_effort_status = :completed )    
what's the datatype of the c_effort_status etc fields ??
And can you enable the trace ( SQLCA.DBMS = TRACE ODBC ) and check in the trace file exactly what's the parameters passed  ??

regards,
Vikas

Author

Commented:
what's the datatype of the c_effort_status etc fields ??  CHAR(20)

And can you enable the trace ( SQLCA.DBMS = TRACE ODBC ) and check in the trace file exactly what's the parameters passed  ?? HAVE NOT DONE THIS BEFORE, BUT WILL TRY.

Author

Commented:
Okay,

I turned it on.  Got the SQLSTATE = 37000 error, but the log file is empy.

Here is the db parameters.  I did reconnect.

// Profile GT3-IMTRAK
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=GT3-IMTRAK;UID=;PWD=',StaticBind=0,ConnectOption='SQL_OPT_TRACE,SQL_OPT_TRACE_ON;SQL_OPT_TRACEFILE,T:\Implementations\ImTrak\SQL.LOG'"
Paul,

I think I may not be of help beyond this, I don't have SQL server, so can't really test...

You can prabably test creating a new simple dw from scratch, and check if it works with retrieval arguments.

Regards,
Vikas
Namasi is master of SQL Server.. he seems to be on leave today....
CERTIFIED EXPERT

Commented:
Hi Folks!

Questions:
1) What is exact error message. With 37000 there should be an error text.
2) Have yiou changed the datatypes of retrieval arguments?
3) At which point you get the error message? When retrriveing?
4) Place a message box in the sql preview event and to display sqlsyntax and post that syntax.
5) Pls post your latest connection string.

Regards..










CERTIFIED EXPERT

Commented:
From query analyser,

What is the default dateformat for your sql server? You may be passing data arguments with wrong format.
CERTIFIED EXPERT

Commented:
On your connection string so you have delimitidentifier is set to Yes or No?

i.e "Enclose Table and Column Names in Qutoes" option is checked ?

Does your datawindow retrieve data within datawindow preview?
CERTIFIED EXPERT

Commented:
This is the connection string that works for my sql server connection.

// Profile team
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
SQLCA.DBParm = "ConnectString='DSN=Team',DelimitIdentifier='No'"

HTH
CERTIFIED EXPERT

Commented:
Your datawindow may still be trying to retrieve using the connection to SQL Anywhere? So make sure to set the correct connection object.
CERTIFIED EXPERT

Commented:
I think I posted a few comments that look ugly. I should summarize,

1) Please find out the default dateformat for your sql server and make sure to pass dates in that format.
From Query analyzer or DB Painter isql, execute select @@language and post the result.
2) Please post the exact error text in addition to error numer
3) Make sure you use the correct transaction object to retreive.
4) Connect to sql server and regenerate your datawindow.
5) Make sure datatypes of retrieval arguments have changed?
6) Try connection with DelimitIdentifier='No' option. Within DB Painter uncheck "Enclose Table and Column Names in Qutoes" option
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
SQLCA.DBParm = "ConnectString='DSN=Team',DelimitIdentifier='No'"
7) Please post your latest connection string, sql, pb code etc...

Please clarify whether you get the error when run the application and retrieve data OR while retrieving data within dw painter.

Redesigning the datawindow is an option, but I would not do that yet.

That should summarize...

One more point
FROM {oj agency RIGHT OUTER JOIN company ON agency.effort_id = company.effort_id LEFT OUTER JOIN service_provider ON company.effort_id = service_provider.effort_id}  

What is oj?



Regards


CERTIFIED EXPERT

Commented:
Now, I think  DelimitIdentifier='No'" setting will do . Copy your sql syntax to isql session within DB Painter. Replace arguments with actual values and execute the query to see if works.

Author

Commented:
Greetings Namasi,

Thank you for your many comments.  I just got home and will start trying them out.  Oddly, I now note that part of the application worked with queries from the get go.  These queries were for columns defined as integer.

Best regards,

Paul

Author

Commented:
I think I posted a few comments that look ugly. I should summarize,

1) Please find out the default dateformat for your sql server and make sure to pass dates in that format.

yyyy-mm-dd hh:mm:ss.uuu

From Query analyzer or DB Painter isql, execute select @@language and post the result.

us_english

2) Please post the exact error text in addition to error numer

Select Error: SQLSTATE = 37000
[Microsoft][ODBC SQL Server Driver] Syntax error or access violation

3) Make sure you use the correct transaction object to retreive.

dw_1.settransobject(sqlca);

4) Connect to sql server and regenerate your datawindow.

I created a quick query against one table and added one retrieval argument.  That worked.

Then I added a two tables (one with a left outer join and one with a right outer join).  Tried the same query.  That did NOT work. Same error.  Here is the Select statement:

SELECT Company.effort_id,  
         Company.c_effort_priority,  
         Company.c_effort_type,  
         Company.c_company,  
         Company.c_first_name,  
         Company.c_last_name,  
         Company.c_email_address,  
         Company.c_address1,  
         Company.c_city,  
         Company.c_state,  
         Company.c_postal_code,  
         Company.c_phone,  
         Company.c_extension,  
         Company.c_fax,  
         Company.c_estimated_yr_trans,  
         Company.c_effort_status,  
         Company.c_target_impl_date,  
         Company.c_req_rate_format  
    FROM {oj Company LEFT OUTER JOIN service_provider ON Company.effort_id = service_provider.effort_id}, {oj agency RIGHT OUTER JOIN Company ON agency.effort_id = Company.effort_id}  
   WHERE Company.c_effort_status = :inprocess  

NOTE THAT THIS WORKS FINE ON ASA.



5) Make sure datatypes of retrieval arguments have changed?

The retrieval arguments were changed from date to datetime (along with the variables).  I tried various combinations of "00:00:00" and "00:00:00:000".

For the test where I just re-created the dw, I only used strings as arguments (no datetime stuff to confuse the issue).

6) Try connection with DelimitIdentifier='No' option. Within DB Painter uncheck "Enclose Table and Column Names in Qutoes" option
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
SQLCA.DBParm = "ConnectString='DSN=Team',DelimitIdentifier='No'"
7) Please post your latest connection string, sql, pb code etc...

Here is my current configuration:

// Profile GT3-IMTRAK
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
SQLCA.DBParm = "ConnectString='DSN=GT3-IMTRAK;UID=;PWD=',StaticBind=0,ConnectOption='SQL_OPT_TRACE,SQL_OPT_TRACE_ON;SQL_OPT_TRACEFILE,T:\Implementations\ImTrak\SQL.LOG',DelimitIdentifier='No'"


Please clarify whether you get the error when run the application and retrieve data OR while retrieving data within dw painter.

Right now I am just using the dw painter.

Redesigning the datawindow is an option, but I would not do that yet.

That should summarize...

One more point
FROM {oj agency RIGHT OUTER JOIN company ON agency.effort_id = company.effort_id LEFT OUTER JOIN service_provider ON company.effort_id = service_provider.effort_id}  

What is oj?   OUTER JOIN



Regards


Author

Commented:
Nasami,

Here is the output from the SQL.LOG file:


pb90            c18-f6c      EXIT  SQLSetConnectOption  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            SQLINTEGER                 104 <SQL_OPT_TRACE>
            SQLPOINTER          0x00000001 (BADMEM)

pb90            c18-f6c      ENTER SQLSetConnectOption
            HDBC                01A81348
            SQLINTEGER                 105 <SQL_OPT_TRACEFILE>
            SQLPOINTER          0x01765BA1 (NYI)
 
pb90            c18-f6c      EXIT  SQLSetConnectOption  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            SQLINTEGER                 105 <SQL_OPT_TRACEFILE>
            SQLPOINTER          0x01765BA1 (NYI)
 
pb90            c18-f6c      ENTER SQLDriverConnectW
            HDBC                01A81348
            HWND                01510386
            WCHAR *             0x1F7B2690 [      -3] "******\ 0"
            SWORD                       -3
            WCHAR *             0x1F7B2690
            SWORD                        8
            SWORD *             0x00000000
            UWORD                        1 <SQL_DRIVER_COMPLETE>

pb90            c18-f6c      EXIT  SQLDriverConnectW  with return code 1 (SQL_SUCCESS_WITH_INFO)
            HDBC                01A81348
            HWND                01510386
            WCHAR *             0x1F7B2690 [      -3] "******\ 0"
            SWORD                       -3
            WCHAR *             0x1F7B2690
            SWORD                        8
            SWORD *             0x00000000
            UWORD                        1 <SQL_DRIVER_COMPLETE>

            DIAG [01000] [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'GDS_Implementations'. (5701)

            DIAG [01000] [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english. (5703)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x01A81EB0
            SWORD                      258
            SWORD *             0x0012C5BE

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x01A81EB0 [      24] "SQLSRV32.DLL"
            SWORD                      258
            SWORD *             0x0012C5BE (24)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       10 <SQL_ODBC_VER>
            PTR                 0x01A81748
            SWORD                      100
            SWORD *             0x0012C634

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       10 <SQL_ODBC_VER>
            PTR                 0x01A81748 [      20] "03.52.0000"
            SWORD                      100
            SWORD *             0x0012C634 (20)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                        2 <SQL_DATA_SOURCE_NAME>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012C52E

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                        2 <SQL_DATA_SOURCE_NAME>
            PTR                 0x01A82770 [      20] "GT3-IMTRAK"
            SWORD                      512
            SWORD *             0x0012C52E (20)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       16 <SQL_DATABASE_NAME>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012C52E

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       16 <SQL_DATABASE_NAME>
            PTR                 0x01A82770 [      38] "GDS_Implementations"
            SWORD                      512
            SWORD *             0x0012C52E (38)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       25 <SQL_DATA_SOURCE_READ_ONLY>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012C52E

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       25 <SQL_DATA_SOURCE_READ_ONLY>
            PTR                 0x01A82770 [       2] "N"
            SWORD                      512
            SWORD *             0x0012C52E (2)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       13 <SQL_SERVER_NAME>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012C52E

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       13 <SQL_SERVER_NAME>
            PTR                 0x01A82770 [      10] "MISDB"
            SWORD                      512
            SWORD *             0x0012C52E (10)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       17 <SQL_DBMS_NAME>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012C3C6

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       17 <SQL_DBMS_NAME>
            PTR                 0x01A82770 [      40] "Microsoft SQL Server"
            SWORD                      512
            SWORD *             0x0012C3C6 (40)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x01A82040
            SWORD                      558
            SWORD *             0x0012C4CC

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                        6 <SQL_DRIVER_NAME>
            PTR                 0x01A82040 [      24] "SQLSRV32.DLL"
            SWORD                      558
            SWORD *             0x0012C4CC (24)

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012C9B0

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012C9B0 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLGetTypeInfo
            HSTMT               01A82A48
            SWORD                        0 <SQL_ALL_TYPES>

pb90            c18-f6c      EXIT  SQLGetTypeInfo  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            SWORD                        0 <SQL_ALL_TYPES>

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        1
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CA1C
            SQLLEN                   130
            SQLLEN *            0x0012C9E8

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CA1C
            SQLLEN                   130
            SQLLEN *            0x0012C9E8 (1231408)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        2
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CA9E
            SQLLEN                     2
            SQLLEN *            0x0012C9EC

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        2
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CA9E
            SQLLEN                     2
            SQLLEN *            0x0012C9EC (1231410)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        3
            SWORD                        4 <SQL_C_LONG>
            PTR                0x0012CAA0
            SQLLEN                     4
            SQLLEN *            0x0012C9F0

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        3
            SWORD                        4 <SQL_C_LONG>
            PTR                0x0012CAA0
            SQLLEN                     4
            SQLLEN *            0x0012C9F0 (1231548)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        4
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CE4C
            SQLLEN                   129
            SQLLEN *            0x0012C9F4

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        4
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CE4C
            SQLLEN                   129
            SQLLEN *            0x0012C9F4 (3)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        5
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CED0
            SQLLEN                   129
            SQLLEN *            0x0012C9F8

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        5
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CED0
            SQLLEN                   129
            SQLLEN *            0x0012C9F8 (0)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        6
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CAA4
            SQLLEN                    64
            SQLLEN *            0x0012C9FC

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        6
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CAA4
            SQLLEN                    64
            SQLLEN *            0x0012C9FC (1)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        7
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012C9E4
            SQLLEN                     2
            SQLLEN *            0x0012CA00

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        7
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012C9E4
            SQLLEN                     2
            SQLLEN *            0x0012CA00 (0)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        8
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012C9E6
            SQLLEN                     2
            SQLLEN *            0x0012CA04

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        8
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012C9E6
            SQLLEN                     2
            SQLLEN *            0x0012CA04 (1)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                        9
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE4
            SQLLEN                     2
            SQLLEN *            0x0012CA08

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        9
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE4
            SQLLEN                     2
            SQLLEN *            0x0012CA08 (1231496)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                       10
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE8
            SQLLEN                     2
            SQLLEN *            0x0012CA0C

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                       10
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE8
            SQLLEN                     2
            SQLLEN *            0x0012CA0C (2009279583)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                       11
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE6
            SQLLEN                     2
            SQLLEN *            0x0012CA10

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                       11
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CAE6
            SQLLEN                     2
            SQLLEN *            0x0012CA10 (1252)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                       12
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CB7E
            SQLLEN                     4
            SQLLEN *            0x0012CA14

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                       12
            SWORD                        5 <SQL_C_SHORT>
            PTR                0x0012CB7E
            SQLLEN                     4
            SQLLEN *            0x0012CA14 (0)

pb90            c18-f6c      ENTER SQLBindCol
            HSTMT               01A82A48
            UWORD                       13
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CAEA
            SQLLEN                   130
            SQLLEN *            0x0012CA18

pb90            c18-f6c      EXIT  SQLBindCol  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                       13
            SWORD                        1 <SQL_C_CHAR>
            PTR                0x0012CAEA
            SQLLEN                   130
            SQLLEN *            0x0012CA18 (1231408)

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 100 (SQL_NO_DATA_FOUND)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       47 <SQL_USER_NAME>
            PTR                 0x01A81EB0
            SWORD                      258
            SWORD *             0x0012CEC0

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       47 <SQL_USER_NAME>
            PTR                 0x01A81EB0 [      16] "pemurray"
            SWORD                      258
            SWORD *             0x0012CEC0 (16)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       77 <SQL_DRIVER_ODBC_VER>
            PTR                 0x01A81748
            SWORD                      100
            SWORD *             0x0012CE52

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       77 <SQL_DRIVER_ODBC_VER>
            PTR                 0x01A81748 [      10] "03.52"
            SWORD                      100
            SWORD *             0x0012CE52 (10)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       93 <SQL_QUOTED_IDENTIFIER_CASE>
            PTR                 0x0012CEA0
            SWORD                        2
            SWORD *             0x0012CEAC

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       93 <SQL_QUOTED_IDENTIFIER_CASE>
            PTR                 0x0012CEA0 (4)
            SWORD                        2
            SWORD *             0x0012CEAC (2)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       32 <SQL_MAX_SCHEMA_NAME_LEN>
            PTR                 0x0012CE7C
            SWORD                        2
            SWORD *             0x0012CE76

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       32 <SQL_MAX_SCHEMA_NAME_LEN>
            PTR                 0x0012CE7C (128)
            SWORD                        2
            SWORD *             0x0012CE76 (2)

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012CE54

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012CE54 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLTablesW
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      EXIT  SQLTablesW  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012CE54

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012CE54 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLTablesW
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      EXIT  SQLTablesW  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012CE54

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012CE54 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLTablesW
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      EXIT  SQLTablesW  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012CE54

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012CE54 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLTablesW
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      EXIT  SQLTablesW  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012CE54

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012CE54 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLTablesW
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      EXIT  SQLTablesW  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            WCHAR *             0x00000000
            SWORD                        0
            WCHAR *             0x01A81DE0 [       3] "d"
            SWORD                        3
            WCHAR *             0x01A812A0 [      -3] "pbca"
            SWORD                       -3
            WCHAR *             0x00000000
            SWORD                        0

pb90            c18-f6c      ENTER SQLFetch
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLFetch  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       46 <SQL_TXN_CAPABLE>
            PTR                 0x0012CE68
            SWORD                        2
            SWORD *             0x0012CE62

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       46 <SQL_TXN_CAPABLE>
            PTR                 0x0012CE68 (2)
            SWORD                        2
            SWORD *             0x0012CE62 (2)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                        9 <SQL_ODBC_API_CONFORMANCE>
            PTR                 0x0012CE68
            SWORD                        2
            SWORD *             0x0012CE62

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                        9 <SQL_ODBC_API_CONFORMANCE>
            PTR                 0x0012CE68 (2)
            SWORD                        2
            SWORD *             0x0012CE62 (2)

pb90            c18-f6c      ENTER SQLGetConnectOption
            HDBC                01A81348
            UWORD                      102
            PTR                0x0012CE74

pb90            c18-f6c      EXIT  SQLGetConnectOption  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                      102
            PTR                0x0012CE74

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       15 <SQL_ODBC_SQL_CONFORMANCE>
            PTR                 0x0012AF7C
            SWORD                        2
            SWORD *             0x0012AF76

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       15 <SQL_ODBC_SQL_CONFORMANCE>
            PTR                 0x0012AF7C (1)
            SWORD                        2
            SWORD *             0x0012AF76 (2)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       21 <SQL_PROCEDURES>
            PTR                 0x01A82EE0
            SWORD                       30
            SWORD *             0x0012B20C

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       21 <SQL_PROCEDURES>
            PTR                 0x01A82EE0 [       2] "Y"
            SWORD                       30
            SWORD *             0x0012B20C (2)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       35 <SQL_MAX_TABLE_NAME_LEN>
            PTR                 0x0012CC40
            SWORD                        2
            SWORD *             0x0012CC3A

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       35 <SQL_MAX_TABLE_NAME_LEN>
            PTR                 0x0012CC40 (128)
            SWORD                        2
            SWORD *             0x0012CC3A (2)

pb90            c18-f6c      ENTER SQLGetFunctions
            HDBC                01A81348
            UWORD                       58
            UWORD *             0x0012D564

pb90            c18-f6c      EXIT  SQLGetFunctions  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       58
            UWORD *             0x0012D564 (1)

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       38 <SQL_OUTER_JOINS>
            PTR                 0x01A82770
            SWORD                      512
            SWORD *             0x0012CFF0

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       38 <SQL_OUTER_JOINS>
            PTR                 0x01A82770 [       2] "Y"
            SWORD                      512
            SWORD *             0x0012CFF0 (2)

pb90            c18-f6c      ENTER SQLAllocStmt
            HDBC                01A81348
            HSTMT *             0012D514

pb90            c18-f6c      EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            HSTMT *             0x0012D514 ( 0x01a82a48)

pb90            c18-f6c      ENTER SQLSetStmtOption
            HSTMT               01A82A48
            UWORD                        3 <SQL_MAX_LENGTH>
            SQLPOINTER          0x00007FFF

pb90            c18-f6c      EXIT  SQLSetStmtOption  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        3 <SQL_MAX_LENGTH>
            SQLPOINTER          0x00007FFF (BADMEM)

pb90            c18-f6c      ENTER SQLPrepare
            HSTMT               01A82A48
            UCHAR *             0x016411BA [      -3] "SELECT  Company.effort_id ,           Company.c_effort_priority ,           Company.c_effort_type ,           Company.c_company ,           Company.c_first_name ,           Company.c_last_name ,           Company.c_email_address ,           Company.c_address1 ,           Company.c_city ,           Company.c_state ,           Company.c_postal_code ,           Company.c_phone ,           Company.c_extension ,           Company.c_fax ,           Company.c_estimated_yr_trans ,           Company.c_effort_status ,           Company.c_target_impl_date ,           Company.c_req_rate_format  FROM {oj Company LEFT OUTER JOIN service_provider ON Company.effort_id = service_provider.effort_id}, {oj agency RIGHT OUTER JOIN Company ON agency.effort_id = Company.effort_id}     WHERE ( Company.c_effort_status = ? )   \ 0"
            SDWORD                    -3

pb90            c18-f6c      EXIT  SQLPrepare  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UCHAR *             0x016411BA [      -3] "SELECT  Company.effort_id ,           Company.c_effort_priority ,           Company.c_effort_type ,           Company.c_company ,           Company.c_first_name ,           Company.c_last_name ,           Company.c_email_address ,           Company.c_address1 ,           Company.c_city ,           Company.c_state ,           Company.c_postal_code ,           Company.c_phone ,           Company.c_extension ,           Company.c_fax ,           Company.c_estimated_yr_trans ,           Company.c_effort_status ,           Company.c_target_impl_date ,           Company.c_req_rate_format  FROM {oj Company LEFT OUTER JOIN service_provider ON Company.effort_id = service_provider.effort_id}, {oj agency RIGHT OUTER JOIN Company ON agency.effort_id = Company.effort_id}     WHERE ( Company.c_effort_status = ? )   \ 0"
            SDWORD                    -3

pb90            c18-f6c      ENTER SQLGetInfoW
            HDBC                01A81348
            UWORD                       77 <SQL_DRIVER_ODBC_VER>
            PTR                 0x01A81748
            SWORD                      100
            SWORD *             0x0012D2BA

pb90            c18-f6c      EXIT  SQLGetInfoW  with return code 0 (SQL_SUCCESS)
            HDBC                01A81348
            UWORD                       77 <SQL_DRIVER_ODBC_VER>
            PTR                 0x01A81748 [      10] "03.52"
            SWORD                      100
            SWORD *             0x0012D2BA (10)

pb90            c18-f6c      ENTER SQLDescribeParam
            HSTMT               01A82A48
            UWORD                        1
            SWORD *             0x0012D328
            SQLULEN *           0x0012D30C
            SWORD *             0x0012D330
            SWORD *             0x0012D34E

pb90            c18-f6c      EXIT  SQLDescribeParam  with return code -1 (SQL_ERROR)
            HSTMT               01A82A48
            UWORD                        1
            SWORD *             0x0012D328
            SQLULEN *           0x0012D30C
            SWORD *             0x0012D330
            SWORD *             0x0012D34E

            DIAG [37000] [Microsoft][ODBC SQL Server Driver]Syntax error or access violation (0)

            DIAG [S1002] [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (0)

pb90            c18-f6c      ENTER SQLErrorW
            HENV                01A81FC8
            HDBC                01A81348
            HSTMT               01A82A48
            WCHAR *             0x0012D29C (NYI)
             SDWORD *            0x0012D2E8
            WCHAR *             0x0012CE9C
            SWORD                      512
            SWORD *             0x0012D2F0

pb90            c18-f6c      EXIT  SQLErrorW  with return code 0 (SQL_SUCCESS)
            HENV                01A81FC8
            HDBC                01A81348
            HSTMT               01A82A48
            WCHAR *             0x0012D29C (NYI)
             SDWORD *            0x0012D2E8 (0)
            WCHAR *             0x0012CE9C [      67] "[Microsoft][ODBC SQL Server Drive"
            SWORD                      512
            SWORD *             0x0012D2F0 (67)

pb90            c18-f6c      ENTER SQLCancel
            HSTMT               01A82A48

pb90            c18-f6c      EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48

pb90            c18-f6c      ENTER SQLFreeStmt
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>

pb90            c18-f6c      EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
            HSTMT               01A82A48
            UWORD                        1 <SQL_DROP>
CERTIFIED EXPERT

Commented:
Paul,

Build you sql using dw painter graphics tool. Not just copy and paste sql in there. ASA syntax is different from SQL Server syntax.

Regards

Author

Commented:
Namasi,

I did build the SQL using the dw painter tool.  I just went to the syntax tab and copied what was there after it was built graphically bu the painter.

Thanks!!

Paul

Author

Commented:
Okay,

I think it may be an SQL outer join issue...

I found this:

DBParm OJSyntax
The DBParm can be set in the Profile on the Syntax tab by choosing one of the options listed below or programmatically by setting one of the values for the DBParm, for example, OJSyntax='ANSI' .
OJSyntax is dynamic, which means it can be reset dynamically during runtime.

The syntax options are:

PB -- Choose this option to generate the syntax as used in earlier versions of PowerBuilder.
ANSI -- This option generates syntax for LEFT and RIGHT outer joins according to ANSI SQL-92 and the rules described below.
ANSI_Escape -- This option will generate the same syntax as the option ANSI, but it encloses the outer joins in Escape notation {oj ...}. Escape notation is part of the Microsoft ODBC specification, described as follows:
" The escape sequence is recognized and parsed by drivers, which replace the escape sequences with DBMS-specific grammar. ODBC itself supports the SQL92 left, right, and full outer join syntax."
NOTE: In PowerBuilder, full outer join syntax is only supported in syntax mode,  not in graphics mode.

I changed the connection in the ODBC database properties to 'ANSI'.  Now a new dw works with the outer joins and the retrieval arguments.  But it is very slow.  Also, I had to put the double quotes back because it was not generating the dw with the fully qualified table_column name.

I continue to experiment.

Namasi, should I get out of ODBC and simply use the native Microsoft SQL Server driver?

Thanks!

Paul
I think yes.. Native database may be the option if you could switch, It will also be faster than ODBC. Here's some more stuff that I found... it say's for MSS, it defaults to ANSI syntax.

Description
All the PowerBuilder database interfaces (except Oracle) have been enhanced to provide support for ANSI SQL-92 outer join SQL syntax generation. PowerBuilder 8 supports both left and right outer joins in graphics mode and full outer and inner joins in syntax mode. For three database interfaces, DIR, SYC and MSS, the database connection defaults to ANSI outer join SQL syntax if the database server supports ANSI. For the remaining four database interfaces, you must select the version of outer join SQL syntax you want PowerBuilder to generate using a new DBParm called OJSyntax.

When ANSI outer join SQL syntax generation is important Selecting the version of SQL syntax PowerBuilder should generate when you create an outer join is relevant only when you create a new DataWindow. The SQL syntax used in existing DataWindows is not changed.

Usage
Generating outer join syntax when using DIR The DIR database interface code always defaults to using ANSI outer join SQL syntax.

Generating outer join syntax when using SYC The SYC database interface code checks to determine the version of the ASE database server to which you are connecting. If you are connecting to ASE 12 or higher, SYC automatically defaults to using ANSI outer join SQL syntax.

Generating outer join syntax when using MSS Like SYC, the MSS database interface code checks to determine the version of the SQL Server database server to which you are connecting. If you are connecting to Version 7 or higher, MSS automatically defaults to using ANSI outer join SQL syntax.

Generating outer join syntax when using IN7/9, JDBC, ODBC, and OLE DB If you are using one of these four database interfaces, you must set the OJSyntax DBParm to indicate the version of outer join SQL syntax you want PowerBuilder to generate. Possible values are:

Value
 Description
 
PB
 Generate the outer join SQL syntax defined for this interface in previous PowerBuilder releases
 
ANSI
 Generate ANSI standard SQL syntax (default for Informix)
 
ANSI_ESCAPE
 GenerateANSI SQL syntax that uses the outer join escape notation (default for JDBC, ODBC, and OLE DB)
 
 The OJSyntax DBParm is set using a dropdown listbox on the Syntax tab.

Regards,
Vikas D
CERTIFIED EXPERT

Commented:
Yes. Native drivers are faster that ODBC.

My application currently does not use ANSI SQL. But I will have to convert them sometime to use ANSI SQL. Microsoft recommends to use ANSI Syntax and in the future  NON-ANSI SQL will not be supported.

Even if you switch to PB Native Driver, use ANSI option as you may save some head ache later.

HTH

Author

Commented:
Namasi,

I am still stuck.  For some odd reason, the dw's work when I just run the dw painter.  But when I run the app it does not work.  As I have changed the connection in the database painter and I thought it would still work.  I have tried a bunch of different options in the dbparm and it does not work.  I have PB Enterprise.  Do you know offhand if it has the Microsoft native drivers on it?  Then, if I deploy the app, will it carry the Microsoft native drivers with it?

Thanks!

Paul
CERTIFIED EXPERT

Commented:
Paul,

Did you change the dbparm in the application to match that of your db profilr. You know you can just copy and paste, right!!!

See preview tab ob DB Profile window. Copy DBPARM from there and paste it into you application.

You will need to deploy PBMSSXXX.dll with your application.? Even if you use ODBC, you will need to deploy pbodbXXX.dll etc.


Regards.


CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT

Commented:
Paul,

Would you need futher help on this issue. If not, please close this issue. :)

Regards-
CERTIFIED EXPERT

Commented:
Thanks for taking the time to maintain open questions. Please feel free throw any questions in this forum.

Also, turn off "Tracing" so that your app runs faster...

Regards-

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.