How to connect Gupta team developer application to Microsoft Sql Server using odbc

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
Amit

How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Amit » 17 Aug 2006, 11:26

 Posted by:  Amit 

hi,

--
Thanks & Regards
Amit Goel
Senior Software Engineer
GSP Team
Nagarro Software Private Limited
Plot - 15, Electronic City, Sector -18, Gurgaon, India
Office Ph:- +91-124-3048710
Mobile:- +91-9810717160

Martin Duty

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Martin Duty » 17 Aug 2006, 16:03

 Posted by:  Martin Duty 

Hi Amit,

What part are you having problems with? Have you looked in the samples
folder? There is an app ther ecalled "odbsal1.app". Have you tried this?
Have you read the Books Online "Connecting Gupta Objects to Databases"?

If you have done all of this, then it would help if you could show us your
SQL.INI, and the DSN you are using.

Martin

Amit

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Amit » 18 Aug 2006, 08:51

 Posted by:  Amit 

hi,

SQl.ini includes the following code and the error is 'can not open the database: 401

Code: Select all

[dbntsrv]
dbname=ISLAND,sqlws32
servername=Server1,sqlws32
cache=2000
sortcache=2000
readonly=0
oracleouterjoin=0
logfileprealloc=0
partitions=0
optimizerlevel=2
ansijoinsyntax=0
dbdir=C:\Program Files\Gupta\Team Developer 2005.1

[dbntsrv.dll]
comdll=sqlws32

[win32client]
clientname=amitgoel
clientruntimedir="C:\Program Files\Gupta\Team Developer 2005.1"
negotiateapi=0

[win32client.dll]
comdll=sqlws32
comdll=sqlodb32
;comdll=sqlora32
;comdll=sqlodb32
;comdll=sqlapipe
;comdll=sqlwsspx
;comdll=sqlntnbi

[win32client.ws32]
serverpath=Server1,localhost/*

;[win32client.ws32]
;  Resource Manager (sqlmpipe uses port 2156 explicitly declared instead of
;  default port 2155
;serverpath=Server1,localhost,2156/*
[odbcrtr]
remotedbname=TEST,DRIVER={SQL
Server};DATABASE=GspTest;SERVER=SVRSQL;AnsiNPW=No;QuotedId=No;
odbctrace=off
odbctracefile=sql.log

[win32client.apipe]
[win32client.wsspx]
[win32client.ntnbi]
--
Regards
Amit Goel

Jarmo Muukka

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Jarmo Muukka » 18 Aug 2006, 13:04

 Posted by:  Jarmo Muukka 

Hi,

For SQL Server you need following lines in your SQL.INI:

Code: Select all

[win32client.dll]
comdll=sqlodb32

[win32client]
setzerolengthstringstonull=on

[odbcrtr]
odbctrace=off
odbctracefile=c:\sql.log
remotedbname=odbcdb,DSN=odbcdsn
In your CTD code you need
Set SqlDatabase = 'odbcdb' ! bind to odbcdsn via this remotedbname

Also, you need to create (preferably in system) DSN in ODBC settings.

HTH,
JMu

Jim McNamara

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Jim McNamara » 18 Aug 2006, 16:48

 Posted by:  Jim McNamara 

[win32client.dll]
comdll=sqlodb32
comdll=sqlws32

For some reason the app likes to see comdll=sqlodb32 first.

Also, you should not need the serverpath= setting in the [odbcrtr] section.

Make sure to test the connection on your DNS setup.

If there is a Gupta.ini file on your PC, delete it.

Amit

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Amit » 21 Aug 2006, 08:34

 Posted by:  Amit 

hi,

it is giving the following error

Error no: 401 : cannot open database.
Reason: FOR SQLBASE: The specified database cannot be found. SQLBase
cannot find the file named "x:\dbdir\dbname\dbname.DBS" where
x:\dbdir is either the default, c:\SQLBASE, or modified with
the DBDIR SQL.INI configuration keyword. In a multiuser
network configuration, this error indicates that your network
is working correctly, but the database system was unable to
locate the specified database filename.

FOR NON-SQLBASE DATABASES: This problem can also occur with a
SQLGateway when leaving out the protocol type in the SERVERNAME
parameter that the client uses to communicate with the gateway
(like SQLNBIOS). For example,

SERVERNAME=SERVER33,SQLQUEUE
DBNAME=DB2DBMS, SQLQUEUE, SQLNBIOS

will nott allow a remote client process (using SQLNBIOS on the LAN
to communicate with the SQLGateway machine) to connect to the
SQLGateway machine.

For SPX connectivity from DOS or MS Windows to a Unixware
SQLBase Server check for the omission of the "serverpath=..."
parameter in the SQL.INI file under the client section.

Remedy: Verify the database file exists. The default drive letter and
dbdirname is c:\SQLBASE unless overridden with a DBDIR SQL.INI
configuration keyword parameter. Verify the DBDIR keyword is
not missing or pointing to a wrong database directory. Verify
the DBNAME keyword is specified for the named database. Verify
the SERVER keyword is not missing or conflicting with other
network server names. In your CONFIG.SYS file, verify at least
40 files set with the FILES=40 parameter. If the server was
being initialized while the connection was tried, retry the
connection after the server has initialized. If all of the
above fails, try using a different database name or try
connecting to the database in single user mode at the same
machine.

--
Regards
Amit Goel

Joachim Verhagen

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Joachim Verhagen » 21 Aug 2006, 14:07

 Posted by:  Joachim Verhagen 

Amit,

The problem is the * in serverpath=Server1,localhost/*
That means all databases.

You have comdll=sqlws32 as the first line in [win32client.dll], so the
driver first searches for sqlbase databases.
There he finds serverpath=Server1,localhost/* and that means all databases.
So he sure he has to look for a sqlbase database is not going to look
anywhere else.

Either replace the * with the names of the sqlbases database names or move
comdll=sqlws32 to the end of [win32client.dll]

Joachim.


--
Joachim Verhagen
WWW http://www.xs4all.nl/~jcdverha/ (Science Jokes)

Amit

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by Amit » 22 Aug 2006, 06:19

 Posted by:  Amit 


thanx, it worked.

Regards
Amit Goel

suresh14_23
India
Posts: 11
Joined: 24 Jun 2020, 12:41
Location: India

Re: How to connect Gupta team developer application to Microsoft Sql Server using odbc

Post by suresh14_23 » 24 Jun 2020, 13:41

Thanks this solution worked for TS connectivity to SQL Server connectivity

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests