Two Database in one Centura File

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
vikram

Two Database in one Centura File

Post by vikram » 17 Jul 2007, 13:41

 Posted by:  vikram 

Hi can we connect to two databases in one Centura code file ?

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

Jim McNamara

Re: Two Database in one Centura File

Post by Jim McNamara » 17 Jul 2007, 15:55

 Posted by:  Jim McNamara 

This is pretty basic - have you RTFM?

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Two Database in one Centura File

Post by Jeff Luther » 17 Jul 2007, 17:47

 Posted by:  Jeff Luther 

You declare 2 Sql Handles, assign your SqlDatabase et al parameters
for the 1st database and invoke SqlConnect( hSqlOne ).

Assuming it connects ok assign, assign your SqlDatabase et al parameters
for the 2nd database and invoke SqlConnect( hSqlTwo ).

Be sure to SqlDisconnect() both handles before or when your application
terminates. And be sure to read the TD and other online PDF books, and
look at the samples. I have a link on my page below if you do not have
the books installed on your machine.

Best Regards,
Jeff @ PC Design
info. & samples: www.JeffLuther.net/gupta/

Alberto Aviles

Re: Two Database in one Centura File

Post by Alberto Aviles » 17 Jul 2007, 18:48

 Posted by:  Alberto Aviles 

i recomend this !!!

if u have 2 or more DB servers u can't use "ALL DATABASES" u have to named
one by one

serverpath=HGDB,xx.xx.xx.xx/db1,db2
serverpath=XYZ,xx.xx.xx.xx/db5,db20

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests