tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Drake" <...@pobox.com>
Subject Re: Column names with spaces in btwn.
Date Wed, 07 Nov 2001 01:08:44 GMT
Surya:

The problem is that SQL does not allow for spaces in identifier names.
Microsoft, extended the standard to allow for this. In order for you to
'correctly' use these sorts of identifiers you'll need to surround them
with square brackets (e.g. [Detailed Description] ). I would advise
you to modify your schema and all corresponding source code to
eliminate all spaces in table and column names, if at all possible.
Those spaces will cause you problems if you every decide to migrate
to another (non-Microsoft) database.


----- Original Message ----- 
From: "Surya Saraff" <surya_saraff@yahoo.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, November 06, 2001 3:03 PM
Subject: Column names with spaces in btwn.


| Hi,
| I tried executing:
| try{
|   PreparedStatement updaterequest;
|   String s = new String( "insert into
| Request(Priority, Detailed Description, Title)
| values('High','Krypton','title' );");
|  updaterequest = con.prepareStatement( s );
|  updaterequest.execute();
|   }
| 
| It gives me "java.sql.SQLException: [Microsoft][ODBC
| Microsoft Access Driver] Syntax error in INSERT INTO
| statement. "
| 
| But, when I have "Description" instead of "Detailed
| Description" it works fine. (I have both those fields
| in my database)
| 
| Does anyone have any idea how I can handle the extra
| space btwn "Detailed" and "Description"
| 
| Regards,
| Surya
| 
| 
| __________________________________________________
| Do You Yahoo!?
| Find a job, post your resume.
| http://careers.yahoo.com
| 
| --
| To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
| For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
| Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
| 
| 
| 


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message