Hello,
I am in need of being able to call SqlDon( ) and SqlINI( ) from within my app to reinitialize the app to use a different database server than what the app first connected to.
At present I am getting 'Undefined function: SqlDon' and 'Undefined function: SqlINI' when I try to run / compile my app.
What library / apl do I need to declare / include to be able to run these functions from within my Team Developer 6.0 app... or is it not even possible and that is not what these functions are for.
Thanks for your help in advance.
~AJ
SqlINI SqlDon
Re: SqlINI SqlDon
You declare them under sqlwntm.dll. I don't have a sample for those specific calls, but here's a few that may help.
Code: Select all
!!CB!! 81
Library name: sqlwntm.DLL
ThreadSafe: No
Function: sqlcre
Description: Create database ( serverhandle, databasename, name length )
Export Ordinal: 0
Returns
Number: WORD
Parameters
Number: WORD
String: LPSTR
Number: WORD
Function: sqlded
Description: Deinstall database
Export Ordinal: 0
Returns
Number: WORD
Parameters
Number: WORD
String: LPSTR
Number: WORD
Function: sqlind
Description: Install database
Export Ordinal: 0
Returns
Number: WORD
Parameters
Number: WORD
String: LPSTR
Number: WORD
Function: sqlcsv
Description: Connect to server
Export Ordinal: 0
Returns
Number: WORD
Parameters
Receive Number: LPWORD
String: LPSTR
String: LPSTR
Function: sqldsv
Description: Disconnect from server
Export Ordinal: 0
Returns
Number: WORD
Parameters
Number: WORD
Re: SqlINI SqlDon
SqlINI is a variable which can be set to point to the sql.ini being used before a first database connection is made.
To switch between different sql.ini files, you need to disconnect all cursors firstly, then change the variable SqlINI, then do new connections.
I've never heared about a function or variable named SqlDon.
To switch between different sql.ini files, you need to disconnect all cursors firstly, then change the variable SqlINI, then do new connections.
I've never heared about a function or variable named SqlDon.
Re: SqlINI SqlDon
Hi AJ,
it looks like you try to call SQL-api-functions (located in sqlwntm.dll) from within a TeamDeveloper .app.
Technically this is possible when you include the dll as external functions.
But it's much easier to do it this way:
Before you connect to an other DBMS, just set the systemvariables SqlDatabase, SqlUser, SqlPassword.
If you want to disconnect from the other DBMS first then call SqlDisconnect(..) for all connected Cursors.
Don't forget to call SqlClearImmediate() which clears the "hidden" SqlHandle that is implicitly connected with SqlImmediate(..)
Regards Thomas
it looks like you try to call SQL-api-functions (located in sqlwntm.dll) from within a TeamDeveloper .app.
Technically this is possible when you include the dll as external functions.
But it's much easier to do it this way:
Before you connect to an other DBMS, just set the systemvariables SqlDatabase, SqlUser, SqlPassword.
If you want to disconnect from the other DBMS first then call SqlDisconnect(..) for all connected Cursors.
Don't forget to call SqlClearImmediate() which clears the "hidden" SqlHandle that is implicitly connected with SqlImmediate(..)
Regards Thomas
Re: SqlINI SqlDon
Thanks all,
We came up with a work around that doesn't require us to change the DBMS while the app is running.
But if I need it in the future I'll attempt to use your suggestion Thomas...
I think the SqlClearImmediate was the piece I was missing.
~AJ
We came up with a work around that doesn't require us to change the DBMS while the app is running.
But if I need it in the future I'll attempt to use your suggestion Thomas...
I think the SqlClearImmediate was the piece I was missing.
~AJ
Who is online
Users browsing this forum: [Ccbot] and 0 guests