Subject | FB Embedded - Create Database - Dialect 1 / 3 Problem - Bug? or Developer Error :) |
---|---|
Author | Jeff Moll |
Post date | 2005-12-01T15:28:39Z |
Hello
I'm new to Firebird and I'm trying to create a database under Windows XP
using the embedded library
(downloaded yesterday).
When I create the Database, it's set to Dialect 1. The book I have by Helen
Borrie says that the
default for a new Firebird DB is Dialect 3, which is what I need. Am I doing
something wrong?
fbclient.dll version 1.5.2.4731
My code is virtually the same as the sample api1.c
*** code snip ***
CString csStr;
csPath += "mydata.fdb";
csStr.Format("CREATE DATABASE '%s' USER 'SYSDBA' PASSWORD
'masterkey'",(LPCTSTR)csPath);
if (isc_dsql_execute_immediate(m_status, &newdb, &trans, 0,
(char*)(LPCTSTR)csStr, 1,NULL))
{
/* Extract SQLCODE from the m_status vector. */
m_sqlcode = isc_sqlcode(m_status);
/* Print a descriptive message based on the SQLCODE. */
if (m_sqlcode == -902)
{
}
/* In addition, print a standard error message. */
//if (pr_error(m_status, "create database"))
return FALSE;
}
isc_commit_transaction(m_status, &trans);
isc_detach_database(m_status, &newdb);
*** end snip ***
When I check the DB using MiTeC IB Query, it shows the DB as set to Dialect
1.
And this is confirmed since I can't add a table with a BIGINT column.
How do I get dialect 3?
Thanks for your help!
Jeff
I'm new to Firebird and I'm trying to create a database under Windows XP
using the embedded library
(downloaded yesterday).
When I create the Database, it's set to Dialect 1. The book I have by Helen
Borrie says that the
default for a new Firebird DB is Dialect 3, which is what I need. Am I doing
something wrong?
fbclient.dll version 1.5.2.4731
My code is virtually the same as the sample api1.c
*** code snip ***
CString csStr;
csPath += "mydata.fdb";
csStr.Format("CREATE DATABASE '%s' USER 'SYSDBA' PASSWORD
'masterkey'",(LPCTSTR)csPath);
if (isc_dsql_execute_immediate(m_status, &newdb, &trans, 0,
(char*)(LPCTSTR)csStr, 1,NULL))
{
/* Extract SQLCODE from the m_status vector. */
m_sqlcode = isc_sqlcode(m_status);
/* Print a descriptive message based on the SQLCODE. */
if (m_sqlcode == -902)
{
}
/* In addition, print a standard error message. */
//if (pr_error(m_status, "create database"))
return FALSE;
}
isc_commit_transaction(m_status, &trans);
isc_detach_database(m_status, &newdb);
*** end snip ***
When I check the DB using MiTeC IB Query, it shows the DB as set to Dialect
1.
And this is confirmed since I can't add a table with a BIGINT column.
How do I get dialect 3?
Thanks for your help!
Jeff