String length of SQl-Statements, creating table
String length of SQl-Statements, creating table
am 03.11.2006 14:21:47 von Peter Prinzen
Hi,
I'm creating a table with ADO and ODBC, and use therefor a CONExecute
"SQL..." w SQL="CREATE TABLE /*!32300 IF NOT EXISTS*/ test.table `ID`
INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, ...". No problem so far, but
two questions: When I create a more complicated table, I get an error,
I guess because the SQL-string is too long. Are there any limits?
Another point: How can I create and ALTER an existing table, to create
the table column after column? Are there any functions to get a list
of existing columns?
The last one: I copied the "CREATE TABLE /*!32300 IF NOT EXISTS*/
from soem other i-net forum. But I would like to know the meaning of
"/*!32300 IF NOT EXISTS*/ ". Any hints here?
Thanks a lot
Peter
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
Re: String length of SQl-Statements, creating table
am 04.11.2006 04:53:17 von pharvey
Peter,
Which C/ODBC (MyODBC) version are you using?
--
Peter Harvey, Software Developer
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
Re: String length of SQl-Statements, creating table
am 04.11.2006 12:43:41 von Peter Prinzen
------=_Part_28493_24121944.1162640621312
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I'm using 3,51... Is the new 5.0....beta stable enough for production
enviroment?
2006/11/4, Peter Harvey :
>
> Peter,
>
> Which C/ODBC (MyODBC) version are you using?
>
> --
> Peter Harvey, Software Developer
> MySQL AB, www.mysql.com
>
> Are you MySQL certified? www.mysql.com/certification
>
>
>
> --
> MySQL ODBC Mailing List
> For list archives: http://lists.mysql.com/myodbc
> To unsubscribe:
> http://lists.mysql.com/myodbc?unsub=peter.prinzen@gmail.com
>
>
------=_Part_28493_24121944.1162640621312--
Re: String length of SQl-Statements, creating table
am 04.11.2006 18:20:41 von pharvey
Peter Prinzen wrote:
> I'm using 3,51... Is the new 5.0....beta stable enough for production
> enviroment?
No - not yet.
--
Peter Harvey, Software Developer
MySQL AB, www.mysql.com
Are you MySQL certified? www.mysql.com/certification
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
RE: String length of SQl-Statements, creating table
am 08.11.2006 11:13:27 von Al McNicoll
Hi Peter,
A few of those questions are a little off-topic, but some quick answers
anyway:
>> When I create a more complicated table, I get an error, I guess because
>> the SQL-string is too long. Are there any limits?
Yes, but I've never yet seen a CREATE TABLE go over those limits. It's more
likely that you've mixed incompatible statements (like declaring a field as
NOT NULL, DEFAULT NULL or something). Try running your statement in a GUI
tool like MySQL Query Browser and see what you get - or at the worst, use
the built-in Table Editor in MySQL Administrator, create your table, and
note the SQL it runs (it prompts you with the code in a message box).
>> Another point: How can I create and ALTER an existing table, to create
>> the table column after column? Are there any functions to get a list
>> of existing columns?
This is in the manual. Go to http://dev.mysql.com/doc/, select the version
of MySQL server you're running, then search for ALTER TABLE (for your first
question) and SHOW COLUMNS (for your second).
>> The last one: I copied the "CREATE TABLE /*!32300 IF NOT EXISTS*/
>> from some other i-net forum. But I would like to know the meaning of
>> "/*!32300 IF NOT EXISTS*/ ". Any hints here?
The IF NOT EXISTS statement tells the DB not to throw an error or overwrite
an existing table if the table already exists. I think the commenting (/*
blah blah */) means that older versions of the server or other SQL servers
that don't support the IF NOT EXISTS statement don't throw an error when
they see it, but I'm not sure on that one.
Most of those questions are not really MyODBC-specific, so you may be better
off asking them on a different list...
Regards,
Al McNicoll
Integritec Limited
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org