Sql Server

General discussion forum about all databases other than SqlBase.
Giorgio Bravi
Italy
Posts: 103
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Sql Server

Post by Giorgio Bravi » 10 Mar 2017, 12:00

I'm planning a migration from 5.2 to 7 of a large application (ERP) with SQL Server
Until now I used OleDB but in recent news Microsoft says it will be deprecated.
So we must go back to ODBC?
Does anyone have tips on this?
Thank you.

Giorgio
Giorgio Bravi
DOLPHIN Software & Thinkware
www.dolphin.it

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Sql Server

Post by FRBhote » 11 Mar 2017, 11:43

If all your connects are done by a single function, then I wouldn't worry about it - when the time comes you can modify just that function.

Gideon Schulter
Netherlands
Posts: 21
Joined: 07 Mar 2017, 08:46
Location: Lelystad, The Netherlands

Re: Sql Server

Post by Gideon Schulter » 14 Mar 2017, 08:39

Hi Giorgio,

Microsoft dropped OLEDB support in the SQLServer Native client already.

If you want to keep using OLEDB from TeamDeveloper to a SQLServer 2014 or 2016 instance, you will need to install the Microsoft SQL Server Native Client 2012.
Both SQL Server 2014 and 2016 are compatible to the SQLServer 2012 Native client.

See: https://msdn.microsoft.com/nl-nl/library/cc280510.aspx

If your source implements SqlCreateSession/SqlCreateStatement/SqlCommitSession, it would be wise to start changing your code to just using SqlConnect.
Best regards,

Gideon Schülter
Lelystad - The Netherlands

Image

Giorgio Bravi
Italy
Posts: 103
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: Sql Server

Post by Giorgio Bravi » 14 Mar 2017, 11:47

Many tanks to all

After some test i can confirm that using new connettivity data access speed up to 50% better

Giorgio
Giorgio Bravi
DOLPHIN Software & Thinkware
www.dolphin.it

gigit
Italy
Posts: 166
Joined: 14 Jun 2017, 15:04
Location: Italy

Re: Sql Server

Post by gigit » 06 Oct 2017, 08:59

Hi George,
I connect to all versions of SqlServer with all versions of TD with this in the ODBC session of sql.ini:

REMOTEDBNAME=AGEPROS,Driver=Sql Server;Server=GIGI01\SQL20012;Database=agepros;LastUser=sa;UseProcForPrepare=0;AnsiNPW=No;QuotedId=No;AutoTranslate=No;Language=English;

Giorgio Bravi
Italy
Posts: 103
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: Sql Server

Post by Giorgio Bravi » 09 Oct 2017, 14:28

I was using the same until TD5.2 then changed to OLEDB
Now it's time to go back (forward?) to ODBC in the process to migrate to TD7

Thank for the info.

Giorgio
Giorgio Bravi
DOLPHIN Software & Thinkware
www.dolphin.it

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Sql Server

Post by FRBhote » 17 Oct 2017, 06:36

Just trying TD7. The same SQL.ini and the same SqlDatabse, SqlUser and SqlPassword which connects in TD 2.1 gives a 00401 DBA COD Cannot open database.

Is there any change - don't see anything in the documents.
[win32client]
clientname=FRB
setzerolengthstringstonull=on


[win32client.dll]
comdll=sqlora32
comdll=sqlodb32
comdll=sqlws32


[odbcrtr]
remotedbname=V,DSN=V

visionpro
Mauritius
Posts: 22
Joined: 21 Jun 2017, 02:07
Location: Mauritius

Re: Sql Server

Post by visionpro » 23 Oct 2017, 06:15

Hi All,
ODBC connection for SQL Server (SQLSRV32.ALL) works well on all SQL Server versions ( From SQLServer 7.0 to SQLServer 2016)

After changing the ODBC to SqlServer native Client (SQLNCI10.DLL) , my application running on Team developer 2 & Team developer 5 does not work.

Error Message [Microsoft][SQL Server Native Client 11.0]Invalid character value for cast specification

It affects fields DATE/TIME. example: UPDATE ACCESS.dbo.SYSUSR SET LSTLOGIN= :dlbpwd.dtDate WHERE USRCOD = :p_sUsrcod
(dlbpwd.dtDate) is defined as DATE/TIME.

Can I have a solution for this.

Thanks

Samad

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Sql Server

Post by FRBhote » 23 Oct 2017, 13:14

Apparently the comdll=sqlora32 causes the problem. Without it the ODBC connect is fine.

BTW, for TD, the remotedbname is not needed. This is what CCOD.pdf says:
Notes: The remotedbname parameter is not necessary for applications built using Team Developer. It is required if you want to use the SqlTalk utility to connect to the ODBC data source.
When connecting to any ODBC data source where the data source name was configured by the ODBC Administrator tool, your application can bypass the remotedbname parameter altogether, and set the variable SqlDatabase to the actual ODBC data source name. Using the above example, if you issue the following statements (assume SqlUser and SqlPassword are set), your program will connect correctly to the Microsoft SqlServer 7.0 data source without using the remotedbname parameter in SQL.INI:
Set SqlDatabase = "MS SqlServer 7.0"
Call SqlConnect (hSql)

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Sql Server

Post by FRBhote » 26 Oct 2017, 06:23

Is it actually possible to have a program running on SqlServer? I get all sorts of ridiculous errors:

Attempt to fetch non-numeric data into numeric column
f4.png
As and when it feels like it this happens:
e1.png
Sometimes Input buffer too small.

Just cannot proceed.
You do not have the required permissions to view the files attached to this post.

Georg Diczig
Germany
Posts: 175
Joined: 15 Mar 2017, 15:15
Location: Cologne Germany

Re: Sql Server

Post by Georg Diczig » 30 May 2018, 14:29

Hi FRBhote,

unfortunately we get the same errors with TD7.0.4 and SQL Server.
Have you found any solutions?
Best Regards
Georg Diczig

FRBhote
India
Posts: 2201
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Sql Server

Post by FRBhote » 31 May 2018, 05:36

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

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 313
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand <--> Stroud, England

Re: Sql Server

Post by Steve Leighton » 24 Jan 2019, 23:42

For anyone considering the ODBC v OLE DB for SQLServer conundrum ..... wef April 2018, Microsoft have just 'undeprecated' their OLE DB Driver for SQL Server versions 2012 to 2017, and released a brand new OLE DB driver which will 'be developed further in preference to ODBC' .
I am testing right now against TD6 and TD7 - so far Ok.

The variable SqlUDL in place of SqlUser, SqlDatabase and SqlPassword can contain a .udl file name with the SqlServer connection string in it, or the string itself. A .udl file is easiest, just create a .txt file, rename it to .udl , double click the .udl file, and a connection wizard allows easy configuration.

Go here for details / download: https://blogs.msdn.microsoft.com/sqlnat ... ql-server/

Go here for my sample: https://forum.tdcommunity.net/viewtopic.php?f=6&t=45816
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Giorgio Bravi
Italy
Posts: 103
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: Sql Server

Post by Giorgio Bravi » 07 Feb 2019, 14:49

Thank you for the info Steve.

Happy to inform that testing with 5.2 and 7.x and is working well without any change on generated EXE.

The rule is always the same: do not believe too quickly what they say .... wait .... wait ... still a little ...
Giorgio Bravi
DOLPHIN Software & Thinkware
www.dolphin.it

User avatar
Steve Leighton
Site Admin
Site Admin
New Zealand
Posts: 313
Joined: 05 Mar 2017, 20:57
Location: Tauranga, New Zealand <--> Stroud, England

Re: Sql Server

Post by Steve Leighton » 08 May 2019, 04:02

re: OLE DB

Here's a trap for new ( and old ) players.... quite logical when you realise it....
both the old 'SQLOLEDB' and new 'MSOLEDBSQL' ( 2018 release ) OLE DB drivers for Sql Server do not support the 'RC' range of isolation levels , which of course is only for SqlBase.
SqlSetIsolationLevel() will just return FALSE if you try and set as RC, RC1, RC2 or RC3 , no Sql error - and so subsequent DML crashes with crazy error codes if you don't handle this.

So if you're in the unfortunate position of having to downgrade ;) from SqlBase to SqlServer , then only 'RO', 'RL', 'CS', and 'RR' isolation levels work with OLE DB for Sql Server.
Greetings from New Zealand
Steve Leighton

Bankside Systems Ltd.
UK ♦ Australia ♦ New Zealand

www.banksidesystems.co.uk

Image

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 0 guests