Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 4th, 2003, 05:47 PM
efay efay is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 efay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Determin SQL Syntax from ODBC connection

How can you determine from the ADO/ODBC connection what identifiers are used in the SQL Syntax. <br>I want to know after the connection has been made to the database what I should encapsulate <br>column and tables names with that contain spaces, or : or - <br><br>E.g <br>MySQL uses backticks - SELECT * FROM `Table Name`<br>SQL Server uses [] or double quotes - SELECT * FROM [Table Name]<br> <img border="0" src="/forum/emoticons/roll.gif" height="15" width="50" alt="roll" />

Reply With Quote
  #2  
Old March 4th, 2003, 08:57 PM
Andrew Andrew is offline
dotNetBB Forums Developer
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 265 Andrew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to Andrew Send a message via AIM to Andrew Send a message via Yahoo to Andrew
You are probably better off setting a global variable in your application that defines what type of connection is being used than trying to resolve based on the connection. Of course, you could always attempt parsing the connection string as an option, but the varaible option would be quicker.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>

Reply With Quote
  #3  
Old October 8th, 2003, 06:32 AM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Avoid problems like that. Not only is it a pain to type these syntaxes but also they cause pbs everywhere.

Name your tables with NO SPACES, no special characters (only the underscore)
Hence: use "a".."z" plus the underscore when naming tables, fields, databases...
nothing else

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Determin SQL Syntax from ODBC connection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT