473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Need Help creating this Table

I have this schema I exported from a database running mysql version 4.01
I'm trying to create this table on a server running mysql 3.23
I keep getting a syntax error near line 11 (I added the line numbers for
clarity. I think it has a problem with the Table Field "ORDER#" I do
have it quoted as shown below so why do I keep getting syntax errors? I
also have problems with the Table Fields "BY" and "DESC" and they are
quoted the same way.
Any suggestions anyone ?

1 CREATE TABLE `tabPO` (
2 `PONUM` int(11) NOT NULL auto_increment,
3 `VENDOR` varchar(12) default NULL,
4 `STATUS` varchar(12) default NULL,
5 `TYPE` varchar(5) default NULL,
6 `PODATE` datetime default NULL,
7 `ORDERED` datetime default NULL,
8 `EXPECTED` datetime default NULL,
9 `SHIP` varchar(10) default NULL,
10 `CLOSEDATE` datetime default NULL,
11 `CHARGES` double default NULL,
12 `ORDER#` varchar(12) default NULL,
13 `NOTE` varchar(80) default NULL,
14 `SHFEE` double default NULL,
15 `PINVOICE` varchar(16) default NULL,
16 `SEPARATE` int(11) default NULL,
17 `LOCATION` varchar(5) default NULL,
18 KEY `PONUM` (`PONUM`)
19 ) TYPE=MyISAM;
Thanks,

Dave

ps I can't use anything but what I got. I'm trying to convert a JET3 MS
Access Database Backend to Mysql. I have no VBA experience to reprogram
the Access FrontEnd.
Jul 20 '05 #1
2 1494
http://dev.mysql.com/doc/mysql/en/Legal_names.html

This doc says:
"Identifier quoting was introduced in MySQL 3.23.6 to allow use of
identifiers that are reserved words or that contain special characters.
Before 3.23.6, you cannot use identifiers that require quotes, so the
rules for legal identifiers are more restrictive..."

So I would assume that the # character is not allowed in a field name in
the earlier version of MySQL. I'm surprised the back-tick characters
are even parsed.

I think you would fix this problem by renaming the field "ORDER#" to
"ORDERNUM", for instance. This might require changing some of the VBA
application, but probably only places where it references that field by
name.

If you really can't touch the VBA code, you'll have to upgrade your
MySQL software to a version that supports special characters in quoted
identifiers.

Regards,
Bill K.

David Heller wrote:
I have this schema I exported from a database running mysql version 4.01
I'm trying to create this table on a server running mysql 3.23
I keep getting a syntax error near line 11 (I added the line numbers for
clarity. I think it has a problem with the Table Field "ORDER#" I do
have it quoted as shown below so why do I keep getting syntax errors? I
also have problems with the Table Fields "BY" and "DESC" and they are
quoted the same way.
Any suggestions anyone ?

1 CREATE TABLE `tabPO` (
2 `PONUM` int(11) NOT NULL auto_increment,
3 `VENDOR` varchar(12) default NULL,
4 `STATUS` varchar(12) default NULL,
5 `TYPE` varchar(5) default NULL,
6 `PODATE` datetime default NULL,
7 `ORDERED` datetime default NULL,
8 `EXPECTED` datetime default NULL,
9 `SHIP` varchar(10) default NULL,
10 `CLOSEDATE` datetime default NULL,
11 `CHARGES` double default NULL,
12 `ORDER#` varchar(12) default NULL,
13 `NOTE` varchar(80) default NULL,
14 `SHFEE` double default NULL,
15 `PINVOICE` varchar(16) default NULL,
16 `SEPARATE` int(11) default NULL,
17 `LOCATION` varchar(5) default NULL,
18 KEY `PONUM` (`PONUM`)
19 ) TYPE=MyISAM;
Thanks,

Dave

ps I can't use anything but what I got. I'm trying to convert a JET3 MS
Access Database Backend to Mysql. I have no VBA experience to reprogram
the Access FrontEnd.


Jul 20 '05 #2
Bill

Thanks, I had a feeling that it might have had something to do with the
mysql server version. I believe the version we use at work is 3.23.58

Dave

Bill Karwin wrote:
http://dev.mysql.com/doc/mysql/en/Legal_names.html

This doc says:
"Identifier quoting was introduced in MySQL 3.23.6 to allow use of
identifiers that are reserved words or that contain special characters.
Before 3.23.6, you cannot use identifiers that require quotes, so the
rules for legal identifiers are more restrictive..."

So I would assume that the # character is not allowed in a field name in
the earlier version of MySQL. I'm surprised the back-tick characters
are even parsed.

I think you would fix this problem by renaming the field "ORDER#" to
"ORDERNUM", for instance. This might require changing some of the VBA
application, but probably only places where it references that field by
name.

If you really can't touch the VBA code, you'll have to upgrade your
MySQL software to a version that supports special characters in quoted
identifiers.

Regards,
Bill K.

David Heller wrote:
I have this schema I exported from a database running mysql version 4.01
I'm trying to create this table on a server running mysql 3.23
I keep getting a syntax error near line 11 (I added the line numbers
for clarity. I think it has a problem with the Table Field "ORDER#" I
do have it quoted as shown below so why do I keep getting syntax
errors? I also have problems with the Table Fields "BY" and "DESC" and
they are quoted the same way.
Any suggestions anyone ?

1 CREATE TABLE `tabPO` (
2 `PONUM` int(11) NOT NULL auto_increment,
3 `VENDOR` varchar(12) default NULL,
4 `STATUS` varchar(12) default NULL,
5 `TYPE` varchar(5) default NULL,
6 `PODATE` datetime default NULL,
7 `ORDERED` datetime default NULL,
8 `EXPECTED` datetime default NULL,
9 `SHIP` varchar(10) default NULL,
10 `CLOSEDATE` datetime default NULL,
11 `CHARGES` double default NULL,
12 `ORDER#` varchar(12) default NULL,
13 `NOTE` varchar(80) default NULL,
14 `SHFEE` double default NULL,
15 `PINVOICE` varchar(16) default NULL,
16 `SEPARATE` int(11) default NULL,
17 `LOCATION` varchar(5) default NULL,
18 KEY `PONUM` (`PONUM`)
19 ) TYPE=MyISAM;
Thanks,

Dave

ps I can't use anything but what I got. I'm trying to convert a JET3
MS Access Database Backend to Mysql. I have no VBA experience to
reprogram the Access FrontEnd.


Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
31
by: Neil | last post by:
I have an Access 2000 MDB with ODBC linked tables to a SQL Server 7 back end. I currently have a selections table in the front end file which the users use to make selections of records. The table...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
4
by: Nathan Benefield | last post by:
I currently have a spreadsheet tracking votes on legislation in a matrix type format. It is something like this Name Act1 Veto1 Act1A Jones yes No Yes Johnson Yes ...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
6
by: daveyand | last post by:
Hey Guys, I've stumped. I created a function that does various things to select boxes. Namely Get All selected indexes, populate array with these values
6
by: mike11d11 | last post by:
My program has to tables in it. One is the Accounts table with all personal information and then there is also my Memos table with all the notes for each account. My program displays one record...
0
by: HydroPnik | last post by:
Hi all! What a great community you have here. Being an Access newbie I have already used much information gleaned from the other posters for my current project. I have been tasked with creating a...
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
2
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.