TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

General discussion forum about all databases other than SqlBase.
lmorales
Chile
Posts: 113
Joined: 31 Aug 2018, 17:05
Location: Santiago Chile

TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by lmorales » 28 Sep 2009, 20:27

Hi,

I try to connect a TD 5.2 application to SQLSERVER EXPRESS 2008 using OLEDB, but i receive errors.

If SqlCreateSession( hSession, 'Provider=SQLOLEDB.1;Data Source=xpleo\\sqlexpress;User ID=sa;Pwd=sqlserver;Initial Catalog=carran;' )
If SqlCreateStatement( hSession, hSql )
Call SalTblPopulate( hWndForm, hSql, "select * from control_procesos", TBL_FillNormal )

OR

If SqlCreateSession( hSession, 'Provider=SQLNCLI10;Server=XPLEO\\SQLEXPRESS;Database=carran;Uid=sa; Pwd=sqlserver;' )
If SqlCreateStatement( hSession, hSql )
Call SalTblPopulate( hWndForm, hSql, "select * from control_procesos", TBL_FillNormal )

The connection strings are ok, but i receive error in session for user "sa"....If i set SqlUser and SqlPassword before, the application crashes...
I attach my application.
any idea please.
Thanks

Leonardo
You do not have the required permissions to view the files attached to this post.

vchong68
Singapore
Posts: 44
Joined: 14 Mar 2019, 02:54
Location: Singapore

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by vchong68 » 29 Sep 2009, 09:57

Try these..
SqlDatabase=""
SqlUser="sa"
SqlPassword="sqlserver"
If SqlCreateSession( hSession, 'Provider=SQLOLEDB;Data Source=xpleo\\sqlexpress;database=carran;Initial Catalog=carran;' )

lmorales
Chile
Posts: 113
Joined: 31 Aug 2018, 17:05
Location: Santiago Chile

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by lmorales » 29 Sep 2009, 17:13

Thanks, but TD crashes...

Leonardo.

lmorales
Chile
Posts: 113
Joined: 31 Aug 2018, 17:05
Location: Santiago Chile

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by lmorales » 29 Sep 2009, 17:30

Sorry, the connection is ok...td crashes when call SalTblPopulate function.

Grid Window
...
On SAM_CreateComplete
! Connection ok
Call SalTblPopulate( grid1, hSql, "select * from control_procesos", TBL_FillNormal )

MichaelD

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by MichaelD » 29 Sep 2009, 18:13

Hi Leonard
I can also confirm that I get the same results as you. If you do comment out the SQLDatabase it works :D, but as soon as you invoke the SalTblPopulate functions the application crashes :( and the Vistual Studio 2005 Just-In-Time Debugger (on my machine) pops up with the "An unhandled win32 exception occurred in cbi52.exe [1488]" (Note the number in the brackets changes each time a reproduce the crash). I tried using the
SQL Native client and I got the same result ( replace Provider value with SQLNCLI.1 in example below).

To reproduce the error this is what I did :

Create a Grid Window called grid1 with one column of type String called colsDBName. Then paste the code below to the Messages Actions section of grid1.
Note you will need to replace the symbol ? (question mark) with the correct values for SqlPassword, Data Source, Pwd And Initial Catalog:

Code: Select all

Windows Variable Section
!!CB!! 118
Session Handle: hSession
Sql Handle: hSql

Message Actions Section
!!CB!! 173
On SAM_CreateComplete
   Set SqlUser="sa"
   Set SqlPassword="?"
   If SqlCreateSession( hSession, 'Provider=SQLOLEDB.1;Data Source=?;User ID=sa;Pwd=?;Initial Catalog=?;' )
      If SqlCreateStatement( hSession, hSql )
         Call SalTblPopulate( grid1, hSql, "SELECT name INTO :grid1.colsDBName FROM master.dbo.sysdatabases ", TBL_FillNormal )

lmorales
Chile
Posts: 113
Joined: 31 Aug 2018, 17:05
Location: Santiago Chile

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by lmorales » 29 Sep 2009, 19:26

Thanks Michael, your example is very complete.

TD 5.2 has a problem with OLEDB...at least in this case. I you uses ODBC, everything works fine!!....we're waiting for SP1??? :?

thanks again
Leonardo

MichaelD

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by MichaelD » 01 Oct 2009, 19:28

I have built a sample app (see attachment) to test various OLEDB Providers, and I have been able to get the app to crash on various combination.
To use the application you will need to load it into the TD5.2 IDE and once compiled and running, perform the following steps in the OLEDB Testing windows:

1. In Step 1. select an OLEDB Provider (I was unable to test Informix)
2. In Step 2. enter your connection settings
3. In Step 3. specify the settings you want to turn ON
4. In Step 4. press the 'Connect' button (at this stage depending on the provider and the settings you turn on the app will crash as soon it tries to create the statement handle)
5. In Step 5. press the 'Get Data' button the application will crash immediately.

There are various combination that work and do not work. Some I have tested are as follows:

Oracle OLEDB Provider - ResultSets ON - TD Crashes on create statement handle
Oracle OLEDB Provider - ResultSets OFF - TD Crashes when 'Get Data' is pressed

SQL Server OLEDB Provider - ResultSets ON - TD Crashes on create statement handle
SQL Server OLEDB Provider - ResultSets OFF - TD Crashes when 'Get Data' is pressed

Does anyone else experience the same issues as I do? If I am doing something wrong :? please let me know.
You do not have the required permissions to view the files attached to this post.

lmorales
Chile
Posts: 113
Joined: 31 Aug 2018, 17:05
Location: Santiago Chile

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by lmorales » 01 Oct 2009, 20:05

Michael,
good job...

please note your code (you are not consider SqlServer). I change the code, but the application always crashes....


Child Table: tblGetData
Function: fnGetData
Description:
Returns
Parameters
Number: npDBType
Static Variables
Local variables
String: sSql
Actions
If npDBType = DBTYPE_Informix
Else If npDBType = DBTYPE_Oracle
Else If npDBType = DBTYPE_SQLServer
Return SalTblPopulate( hWndForm, hSql1, sSql, TBL_FillNormal )

MichaelD

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by MichaelD » 01 Oct 2009, 20:21

Thanks Leonardo :wink:
an oversight on my part.

MichaelD

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by MichaelD » 04 Oct 2009, 18:10

I have also tried the sample SqlUDLSample.app in the folder Samples\Connectivity\OLE DB and I get the same crash result.

I have tried stripping the sql.ini file to the bare minimum, but to no avail, it still crashes.
At the same time I have also run procexp.exe (from the Sysinternals Suite by Mark Russinovich) side by side to make sure that the correct modules are loaded and that I am not picking up any old dll's, but this is not the case and all loaded modules used by TD 5.2 are pointing to the correct locations.

Get anyone help me or point me in the right direction ?

herve

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by herve » 05 Oct 2009, 07:08

Hello,

Yes, there is a known problem with OLEDB SQLSERVER 2005/2008 concerning SalTblPopulate.
The bug number is TD-8578.

Regards

Hervé

MichaelD

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by MichaelD » 05 Oct 2009, 15:59

Thanks Hervé
but I do not think this issues is SQLServer specific, as it occurs with the SQLBase and Oracle OLEDB providers as well (the sample above is SQLBase specific).

kitchman
France
Posts: 11
Joined: 02 Oct 2018, 07:07
Location: France

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by kitchman » 03 Mar 2010, 14:30

MichaelD wrote:Thanks Hervé
but I do not think this issues is SQLServer specific, as it occurs with the SQLBase and Oracle OLEDB providers as well (the sample above is SQLBase specific).
I confirm for Oracle OLEDB. SalTblPopulate() hangs my application. I stay in 5.1 PTF6 for the moment...

jmcnamara

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by jmcnamara » 03 Mar 2010, 14:43

I don't know if this is the same issue, but we had certain selects (in SalTblPop...) that were hanging in TD4.2.

It started when the database was upgraded from 10g -> 11g and the client was still on 10g. It happened only if the result set exceeded 70-100 rows and included a timestamp column.

It was resolved by updating the Oracle client.

mando

Re: TD 5.2 OLEDB and SQLSERVER EXPRESS 2008

Post by mando » 03 May 2010, 18:23

Hello,
This issue was resolved and delivered with service pack 1 of Team Developer 5.2.
You can download the service pack here (http://guptatechnologies.com/Services/p ... loads.aspx) and let us know if you run into any other issues.

Salutations!

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest