MS SQLServer OLEDB error trapping
MS SQLServer OLEDB error trapping
Hi
I can add that the latest OLEDB driver is faster than latest ODBC driver connecting TD63/SQLSERVER 2017.
I run a Payroll Calculation for 250 employees
a) ODBC : 1mn 30 secs
b) OLEDB : 47 secs
I re-worked my libraries which help me to swap from ODBC/OLEDB or OLEDB/ODBC easily.
Thanks Steve for providing me the hint from example OLEDBSample_INSERTandSCROLL_TD63 some months ago.
Cheers
Samad Sodul
Ebene
Mauritius
I can add that the latest OLEDB driver is faster than latest ODBC driver connecting TD63/SQLSERVER 2017.
I run a Payroll Calculation for 250 employees
a) ODBC : 1mn 30 secs
b) OLEDB : 47 secs
I re-worked my libraries which help me to swap from ODBC/OLEDB or OLEDB/ODBC easily.
Thanks Steve for providing me the hint from example OLEDBSample_INSERTandSCROLL_TD63 some months ago.
Cheers
Samad Sodul
Ebene
Mauritius
-
- Site Admin
- Posts: 437
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: MS SQLServer OLEDB error trapping
.
Thanks Samad for the OLEDB speed confirmation for SqlServer.
I agree that the latest driver is a lot faster than ODBC. esp. when the SSPROP_INIT_PACKETSIZE is tweaked accordingly.
And for no need for a messy Sql.ini on every client.
Thanks Samad for the OLEDB speed confirmation for SqlServer.
I agree that the latest driver is a lot faster than ODBC. esp. when the SSPROP_INIT_PACKETSIZE is tweaked accordingly.
And for no need for a messy Sql.ini on every client.
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Re: MS SQLServer OLEDB error trapping
Dear Steve,
I am not an expert in TD. Only to confirm if I am doing it right for OELDB.
Can you share a sample TD program for OLEDB connecting to SQL Server to catch the SQL Error, ( That is a piece of code for Begin Transaction, DBP_AUTOCOMMIT, Rollback, When SQL Error).
Thanks a lot
Samad
I am not an expert in TD. Only to confirm if I am doing it right for OELDB.
Can you share a sample TD program for OLEDB connecting to SQL Server to catch the SQL Error, ( That is a piece of code for Begin Transaction, DBP_AUTOCOMMIT, Rollback, When SQL Error).
Thanks a lot
Samad
-
- Site Admin
- Posts: 437
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: MS SQLServer OLEDB error trapping
Simple OLEDB error trapping example attachedSamad said:
Can you share a sample TD program for OLEDB connecting to SQL Server to catch the SQL Error,
You do not have the required permissions to view the files attached to this post.
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Re: MS SQLServer OLEDB error trapping
Thanks a lot Steve for this example.
Best Regards
Samad
Best Regards
Samad
Re: MS SQLServer OLEDB error trapping
I feel there is no need for sql.ini for any router if the router dll is directly passed to SqlDatabase as it is below.
Set SqlDatabase="ConnectionString:comdll=sqlodb32;dbname=MSSQLDB"
All other required parameters can be set through SqlSetxxxxxx().
I am not sure SetZeroLengthStringToNull is supported to be appended in ConnectionString in SqlDatabase. I have raised ticket on this sometime back but not sure whether this is resolved now.
Thanks
Siva A
Set SqlDatabase="ConnectionString:comdll=sqlodb32;dbname=MSSQLDB"
All other required parameters can be set through SqlSetxxxxxx().
I am not sure SetZeroLengthStringToNull is supported to be appended in ConnectionString in SqlDatabase. I have raised ticket on this sometime back but not sure whether this is resolved now.
Thanks
Siva A
-
- Site Admin
- Posts: 437
- Joined: 05 Mar 2017, 20:57
- Location: Stroud, England <--> Tauranga, New Zealand
Re: MS SQLServer OLEDB error trapping
.
Assume you're referring only to ODBC routers, as unfortunately only works with ODBC - not TCP/IP ( comdll=sqlws32 ) as in the case of SQLBase native router.
But good to know if using odbc.
Thanks
Siva Thanks for the tip.Siva says:
there is no need for sql.ini for any router
Assume you're referring only to ODBC routers, as unfortunately only works with ODBC - not TCP/IP ( comdll=sqlws32 ) as in the case of SQLBase native router.
But good to know if using odbc.
Thanks
Greetings from New Zealand
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Steve Leighton
Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand
www.banksidesystems.co.uk
Re: MS SQLServer OLEDB error trapping
Hi Steve,
I haven not tried for SQLBase but It should work for Sqlora32, Sqlodb32, sqlsyb32,sqlifx32.
In case of SB Native router, I am not sure how clientruntimedir works if you have more than on SB since this parameter can not be set through coding.
Thanks
Siva A
I haven not tried for SQLBase but It should work for Sqlora32, Sqlodb32, sqlsyb32,sqlifx32.
In case of SB Native router, I am not sure how clientruntimedir works if you have more than on SB since this parameter can not be set through coding.
Thanks
Siva A
Re: MS SQLServer OLEDB error trapping
Hi all,
FYI, this works for SQLBase also!
I use it like this:
I couldn't find it in the docs, but was made aware of it by OT support.
For some reason it still does require you to have a generic sql.ini, didn't had time to investigate this, maybe it's because my country settings, or I have a hidden connect buried in my classes before the string was set up in my monstruous app.
FYI, this works for SQLBase also!
I use it like this:
Code: Select all
Set SqlDatabase = 'ConnectionString: data source=' || gbl_sWindowsServerName || ';transport=tcpv4;port=2155;servername='|| gbl_sSQLBaseServerName || ';dbname=' || gbl_sDatabaseName'
For some reason it still does require you to have a generic sql.ini, didn't had time to investigate this, maybe it's because my country settings, or I have a hidden connect buried in my classes before the string was set up in my monstruous app.
Igor Ivanovic
Who is online
Users browsing this forum: [Ccbot] and 1 guest