Solved

Table column name conflicts with keyword "date"...

Posted on 2004-08-30
5
336 Views
Last Modified: 2012-06-27
Hi!
    I am using CTLib to connect the Sybase IQ database. There is a table named "Table1" and one column named "date".

The following is the SQL:
   select "date" from "Table1"

This statement works in the interactive SQL environment but FAIL in CTLib API.


Could somebody help? thanks.
0
Comment
Question by:small_potato
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:ChrisKing
ID: 11939934
What CT-Lib command are you using to execute this ?
0
 

Author Comment

by:small_potato
ID: 11940334
The sequence is:
ct_command()
ct_send()
ct_result()

The return result is FAIL.
0
 
LVL 6

Expert Comment

by:ChrisKing
ID: 11941027
I have no issue embedding quotes, are you using CS_LANG_CMD and CS_NULLTERM ?
eg. ct_command(..., CS_LANG_CMD, (CS_VOID *) QueryString, CS_NULLTERM, CS_UNUSED)

can you provide the actual line of c code where you set / pass you query string
0
 
LVL 19

Accepted Solution

by:
grant300 earned 250 total points
ID: 11947741
Try using the command:
    set quoted identifiers on

If that doesn't work, try setting them off.

I believe there is a different default setting for the connection depending on whether you are using jConnect 5.5 or isql/ct_lib directly.  You can try setting them on and off in ISQL as well and see what happens.

Bill
0
 

Author Comment

by:small_potato
ID: 11970594
Thank you very much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now