If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Pervasive ODBC Connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-09, 01:22
kbhanu kbhanu is offline
Registered User
 
Join Date: Jan 2009
Posts: 2
Pervasive ODBC Connection

Hi,

I am using VS2005 for connecting Pervasive Database through ODBC and Its connecting to the Database properly.

Next same ODBC I am using in our application to connect the database and its connecting But when I am trying to execute the query its giving error "Table Name too Long".

My Code is:

string conStr="Dsn=TimberLinePM;dbq=F:\tsgold\Sample TimberLine PM Database;codepage=1252;dictionarymode=0;standardmo de=0;maxcolsupport=255;shortennames=0;databasetype =1";

OdbcConnection con = new OdbcConnection(conStr);
string strSql = "select * from property_pmp_property";
OdbcCommand cmd = new OdbcCommand(strSql, con);
OdbcDataReader dReader;

dReader = cmd.ExecuteReader();

Error comes here when he try to run "ExecuteReader"

Please help...!!

With Regards,
K B Mishra
Reply With Quote
  #2 (permalink)  
Old 01-14-09, 07:48
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,026
Most PSQL databases only support table names of 20 characters. Only v10 supports the "V2" metadata which supports longer table names.

The solution to your problem is to reduce the length of your table name.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 01-15-09, 08:15
kbhanu kbhanu is offline
Registered User
 
Join Date: Jan 2009
Posts: 2
Thanks for your guidance.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On