(quert Reg:) Sql.ini

forum.centura.web.developer (2000-2005) & forum.td.web (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 29 Nov 2003, 07:49

 Posted by:  Madhuram 

Hi all,

is it possible to change Sql.ini at Runtime,
so that i can connect to remote database at form load
fetch some data, and get back the original sql.ini,
so that i connect to local database.

Can this be done using SqlSetParameter/All.

Any Ideas,

Thanx.

Madhusudhan

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 11:52

 Posted by:  K.Henningsson 

Madhuram,

(Post in one forum only. (forum.connectivity), please)

Answer: No, not to my knowledge.

Kriss
--
--------------------------------------------------
FAQ-stuff
OS: windowsXP
GUPTA: TD30 ptf1
Database Oracle 8.1.7
--------------------------------------------------
FUN-stuff

"A man's reach should exceed his grasp, or what is heaven for?"

--------------------------------------------------

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 12:00

 Posted by:  Thomas Lauzi 

AFAIK the Sql.ini is loaded on startup. So changing have no effect during
runtime.
You can add both databases to the the sql.ini and make two connections to
the different databases.
Never made this, but heard here in the forum that it should be possible, so
somebody else should know more about it.......
(You also should search in forum.connectivity, perhaps you´ll get a thread
about this subject)

Thomas L.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 12:04

 Posted by:  Rainer Ebert 

Thomas,

connecting to multiple databases at the same time is very simple. For each
database:
- Set SqlDatabase, SqlUser and SqlPassword to the appropriate values
- Call SqlConnect( hSql )
- Don't forget to set SqlDatabase, SqlUser and SqlPassword to the database
you want to connect to normally

Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 12:05

 Posted by:  Rainer Ebert 

Kriss,

he made a crosspost, which is o.k.

Rainer

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 13:50

 Posted by:  K.Henningsson 

Hi Rainer,

very efficient to post a connectivity question in
forum.advanced.programming,

forum.centura.team.developer,

forum.centura.web.developer,

forum.connectivity,

forum.sqlbase,

forum.sqlwindows

Ok that killing a posting in one forum kills it in all forums, but it is so
cool to have all questions in all forums. Why not just have one newsgroup
folks, forum.gupta.unsorted.crap

just my 2?

Regards,
Kriss
--
--------------------------------------------------
FAQ-stuff
OS: windowsXP
GUPTA: TD30 ptf1
Database Oracle 8.1.7
--------------------------------------------------
FUN-stuff

"A man's reach should exceed his grasp, or what is heaven for?"

--------------------------------------------------

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 01 Dec 2003, 16:41

 Posted by:  Jim McNamara 

Plus appropriate protocol entries in the sql.ini. Connecting to multiple
databases from multiple sources (local, lan, wan, odbc, etc.) is, as Rainer
said, very simple - as long as the data source is defined in the .ini.

Once your app has loaded, it will do no good to change the .ini to make a
different connection unless you plan to close and restart the app.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

(quert Reg:) Sql.ini

Post by NewsgroupServer » 02 Dec 2003, 15:58

 Posted by:  Niels Allerheiligen 

if i remember correctly, i forced a reload of a changed sql.ini by
calling
sqldon() and
sqlini(0)
from sqlbase api

!!CB!! 81
Library name: SQLWNTM.DLL
Function: sqlini
Description:
Export Ordinal: 0
Returns
Number: INT
Parameters
Number: INT
Function: sqldon
Description:
Export Ordinal: 0
Returns
Number: INT
Parameters

-niels

Return to “td.web”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests