LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2005, 12:53 AM   #1
mitrship
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Problem with mysql table name


hi
i have a table name in mysql database named 'my pet'. I want to get the columns of the table using Jdbc.
but no columns are returned by getColumns.
Plz help me

ResultSet rsColumns = dataBaseMetaData.getColumns(this.getCatalog() , this.getSchema(), `my pet`,null);

thanking in advance
saurabh
 
Old 07-25-2005, 03:01 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Generally speaking I'd advise against spaces in table name, as you need to ensure that the name is properly quoted when it hits the mysql engine, and a lang like Java for example will prob strip quotes by default...
See http://dev.mysql.com/doc/mysql/en/legal-names.html
 
Old 07-25-2005, 07:12 AM   #3
mitrship
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
thnks mate
but ours is a reporting tool for databases. The database and tables are at the clients, and we are not sure the table format. So the code should take all the possible names in consideration
ne ways thnks
mitrship
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
table views problem (MySQL ODBC OOo) landroni Linux - Software 0 08-19-2005 03:00 PM
Problem inserting data into a mysql table using PHP Rockgod2099 Programming 13 08-03-2005 12:27 AM
MySQL non-realtime table-by-table mirroring Passive Linux - Software 1 01-20-2004 12:11 PM
How to import MS ACCESS Table including OLE filed into the MySQL Table ? myunicom Linux - General 1 11-28-2003 11:30 AM
deleted mysql table in mysql now cant do anything nakkaya Linux - Software 0 03-18-2003 06:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration