Subject | RE: [firebird-support] FB Embedded - Create Database - Dialect 1 / 3 Problem - Bug? or Developer Error :) |
---|---|
Author | Jeff Moll |
Post date | 2005-12-01T21:38:46Z |
Hi All
I figured it out, minutes after posting the message. Never fails.
Thanks Anyway :)
The key was the Dialect variable in the commands. Should have been 3, not
1 as in the samples.
command should have been:
isc_dsql_execute_immediate(m_status, &newdb, &trans, 0,
(char*)(LPCTSTR)csStr, 3, NULL)
Thanks!
I figured it out, minutes after posting the message. Never fails.
Thanks Anyway :)
The key was the Dialect variable in the commands. Should have been 3, not
1 as in the samples.
command should have been:
isc_dsql_execute_immediate(m_status, &newdb, &trans, 0,
(char*)(LPCTSTR)csStr, 3, NULL)
Thanks!
> -----Original Message-----
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Jeff Moll
> Sent: December 1, 2005 10:29 AM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] FB Embedded - Create Database -
> Dialect 1 / 3 Problem - Bug? or Developer Error :)
>
> 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
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Most low income households are not
> online. Help bridge the digital divide today!
> http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/67folB/TM
> --------------------------------------------------------------
> ------~->
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources
> item on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>