How to change Team Dev. app from SQLBase Db to SQLServer

General discussion forum about all databases other than SqlBase.
davidi

How to change Team Dev. app from SQLBase Db to SQLServer

Post by davidi » 28 Feb 2008, 00:48

Hi,
I'm not normally a Team Developer developer, I usually work with .Net but I have a small job to change an application written with Team Developer 5.1 from a backend of SQBLBase 9.0.1 database to an SQL Server 2000 database. Can anyone help with what needs to be done do achieve this ? Maybe even point me to a link to a doco or similar.

BTW: I have already migrated the DB to SQLServer so I just need the connection process.

Thanks
Dave

Jean-Marc Gemperle

Re: How to change Team Dev. app from SQLBase Db to SQLServer

Post by Jean-Marc Gemperle » 29 Feb 2008, 16:58

Hi,

That should not cause much trouble...appart of using now SQLSERVER instead of SQLBASE ;-) well sort of kiding here...

You have the choice of using either NATIVE connectivity via ODBC (SQLODB32.DLL) or OLEDB SqlCreateSession()/SqlCreateStatment() see HLP to get an HSQL for your session, you can also migrate using the versatility of SqlUDL see HLP as well. If you use OLEDB use those function above or SqlUDL and provide the proper connection string, at this point you would connect, and would have a hSQL and typically all SqlPrepare/Execute /SalTblPopulate etc should work without modification...I doubt Store procedure where used in SB? Anyway you can Use SqlPrepareSp(). SqlImmediate() is not supported with OLEDB (replace by SqlPrepareAndExecute()) Also check the SqlGet/SetParameterAll function call. That's about it for OLEDB. OLEDB does not use SQL.INI nor the SBAPI thus in a way it is simplier.

For ODBC connection (there are different ways to connect) the typicall way :

1)configure your SQL.INI
[win32client.dll]
comdll=sqlodb32

// ths is what we call our native router, that will go to ODBC. It is not really required to have in the SQL.INI as it get loaded anyway automatically, still do it as it is the formal way

[win32client]
clientname=jm-laptop2
clientruntimedir="C:\Devel\TD510"
//clientruntimedir is really important it should be set to the path where Sqlwntm/sqlbapw.dll is located along with the router in the case SQLODB32.dll


[odbcrtr]
remotedbname=sqlsv,dsn=sqlsvdsn

//sqlsv is a kind of alias to the ODBC DSN, used when connecting in TD ie
Set SqlDatabase='sqlsv'
..
..
Call SqlConnect(hSq)

So in you existing SQL.INI comment the serverpath to the SQLBASE database, comment also Sqlws32 in [win32client.dll]. Use the value of SqlDatabase you currntly use in your application for the odbcremotedbname.


And that is about it as far as connetion goes. You can also set your SqlDatabase to the REAL DSN NAME without having those entries in hte SQL.INI. When doing
Set SqlDatabase='the_sqlsrv_dsn'
..
..
Call SqlConnect(hSq)
a file Gupta.ini will be created on the fly and will connect you.

Hope this helps...

By the way just curious, what did you use to convert the DB? DTS?

Cheers
Jean-Marc

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 3 guests