Anyone know how to call this API function in Foxpro?
I need to call this to be able to create a Firebird database "on the fly" (ODBC/OLE DB doesn't support CREATE DATABASE command)
Thanks in advance.
I need to call this to be able to create a Firebird database "on the fly" (ODBC/OLE DB doesn't support CREATE DATABASE command)
Code:
ISC_STATUS isc_dsql_execute_immediate(
ISC_STATUS *status_vector,
isc_db_handle *db_handle,
isc_tr_handle *trans_handle,
unsigned short length,
char *statement,
unsigned short dialect,
XSQLDA *xsqlda);
[code]
ISC_STATUS is long type
isc_db_handle, isc_tr_handle are void type
A have a C call that works, but I don't know how to translate it into a VFP call.
[code]
ISC_STATUS status_vector[20];
char *statement =
"CREATE DATABASE ’C:/INVENTORY.GDB’ PAGE_SIZE 4096 USER ’SYSDBA’ PASSWORD ’masterkey’";
isc_db_handle db_handle = NULL;
isc_tr_handle dummy_handle = NULL;
isc_dsql_execute_immediate(
status_vector,
&db_handle,
&dummy_handle,
0,
statement,
1,
NULL);
if (status_vector[0] == 1 && status_vector[1])
{
/* Process error. */
isc_print_status(status_vector);
return(1);
}
Thanks in advance.