Reloading sql.ini

forum.centura.team.developer (1998-2005) & forum.sqlwindows (2000-2005)
gbd

Reloading sql.ini

Post by gbd » 29 Nov 2004, 11:01

 Posted by:  gbd 

Is it possible to force a application at runtime to reload the sql.ini file
after modifying it ?

Krister Henningsson

Re: Reloading sql.ini

Post by Krister Henningsson » 29 Nov 2004, 11:16

 Posted by:  Krister Henningsson 

Hello Gery,

search for subject "reload" from:"pawel"

(fast restart of application)

--
--
Regards, Kriss

Former Gupta Developer :-/
"Sitting target
Sitting waiting
Anticipating
Nothing
Nothing

Life
Is full of surprises
It advertises
Nothing
Nothing

What am I trying to do
What am I trying to say
I'm not trying to tell you anything
You didn't know
When you woke up today

Sitting target
Sitting praying
God is saying
Nothing
Nothing

Always
Knows the prospects
Learnt to expect
Nothing
Nothing"
--Depeche Mode

gbd

Re: Reloading sql.ini

Post by gbd » 29 Nov 2004, 11:34

 Posted by:  gbd 

Unfortunately, I haven't this subject in my view ,
oldest subject is from 23/03/2004

Krister Henningsson

Re: Reloading sql.ini

Post by Krister Henningsson » 29 Nov 2004, 11:34

 Posted by:  Krister Henningsson 

repost comes here :-)

--
--
Regards, Kriss

Former Gupta Developer :-/
"Sitting target
Sitting waiting
Anticipating
Nothing
Nothing

Life
Is full of surprises
It advertises
Nothing
Nothing

What am I trying to do
What am I trying to say
I'm not trying to tell you anything
You didn't know
When you woke up today

Sitting target
Sitting praying
God is saying
Nothing
Nothing

Always
Knows the prospects
Learnt to expect
Nothing
Nothing"
--Depeche Mode

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

gbd

Re: Reloading sql.ini

Post by gbd » 29 Nov 2004, 11:50

 Posted by:  gbd 

I 've now loaded all messages ( until 29/09/2000 )
but i do'nt find this subject,
is it on a other Centura forum ?

Pawel Streich

Re: Reloading sql.ini

Post by Pawel Streich » 29 Nov 2004, 11:56

 Posted by:  Pawel Streich 

See attachment

Regards,
Pawel

news:1101722177.241183@callisto...

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

gbd

Re: Reloading sql.ini

Post by gbd » 29 Nov 2004, 12:23

 Posted by:  gbd 

It is not a satisfying solution for me...
I have a huge application that does many thing at SAM_destroy ( save windows
locations etc ) and at the creation , I fear that the ini files
modifications and reading telescope themself....

I just want to be able to access a database just after create its odbc entry
in sql.ini...

Martin Duty

Re: Reloading sql.ini

Post by Martin Duty » 29 Nov 2004, 14:52

 Posted by:  Martin Duty 

This is how I deal with missing DSN's in the ODBC. I do not use the SQL.INI
to do my connections. Though this is for SQLServer it should work for any
ODBC connections.

Set bExists = SalSysRegistryRead( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources\\', strNameOfDSNEntry,
strRegistryServerType )
If not bExists
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources\\', strNameOfDSNEntry, 'Sql
Server' )
If not bExists
Call SalMessageBox( 'There was a problem with setting up the ODBC.
Please inform the IS Department.', 'TimeKeeper Error!', MB_Ok )
Return FALSE
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, "Driver",
C:\\WINNT\\System32\\SQLSRV32.dll' )
If not bExists
Call SalMessageBox( 'There was a problem with setting up the ODBC.
Please inform the IS Department.', 'TimeKeeper Error!', MB_Ok )
Return FALSE
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, 'LastUser', strGlobalName )
If not bExists
Call SalMessageBox( 'There was a problem with setting up the ODBC.
Please inform the IS Department.', 'TimeKeeper Error!', MB_Ok )
Return FALSE
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, 'Server', strServerName )
If not bExists
Call SalMessageBox( 'There was a problem with setting up the ODBC.
Please inform the IS Department.', 'TimeKeeper Error!', MB_Ok )
Return FALSE
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, 'Trusted_Connection', 'Yes' )
If not bExists
Call SalMessageBox( 'There was a problem with setting up the ODBC.
Please inform the IS Department.', 'TimeKeeper Error!', MB_Ok )
Return FALSE
Else
Set bExists = SalSysRegistryRead( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, 'Server', strServerName )
If not strGlobalDefaultServer = strServerName
Set bExists = SalSysRegistryWrite( HKEY_CURRENT_USER,
'SOFTWARE\\ODBC\\ODBC.INI\\' || strServer, 'Server',
strGlobalDefaultServer )
Set strServerName = strGlobalDefaultServer

This works with a trusted connection using NT Authorization. There is
another thread in the forum from me on how I use this, it might help if you
search on it and look at that information. If the SqlDatabase system
variable is set to the name of the DSN, then it will connect without any
SQL.INI setting. The above code shows how to create the DSN in the
registery.

HTH

--
Martin Duty
IT Manager
Underground Vaults & Storage, Inc.

FAQ-stuff
------------------------------------------------
OS: Win 2K
GUPTA: TD3.0 PTF2(R)
DB: MS SQL Server 2000
------------------------------------------------

Matthias Körner

Re: Reloading sql.ini

Post by Matthias Körner » 23 Dec 2004, 13:47

 Posted by:  Matthias Körner 

on DevCon in Dresden Mike Vandine says "SQLB 9.0 dos this automaticly"..

Matthias Körner

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests