Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / December 2004

Tip: Looking for answers? Try searching our database.

how do i query access database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ali G - 28 Dec 2004 18:53 GMT
I have a very basic database setup in Acces 2003. Iit contains an ID,
First_Name, and Last_Name.  In access i have set all three as key (i
highlighted the three rows in design vew and clicked on the key button). I'm
using asp and sql to query.

When i use "select * FROM table WHERE ID = 104" this statement works fine
but when i use "select * From table Where First_Name = \"joe\"" it doest
work and gives me an error as such:

Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/marks.asp, line 81, column 61

I don't know if this issue is related to "key" or the fact that they are
text value.\

if anyone has a good idea can you please let me know.

Thanks
MacDermott - 29 Dec 2004 11:48 GMT
AFAIK, the Jet compiler does not recognize \ as an escape character.
Some options:
   Use "" to include a double quote.
   Use ' to surround a text value inside a double-quoted string.
       (Beware, though, if you use this for Last Names like O'Neill)
   Concatenate in chr$(34)

> I have a very basic database setup in Acces 2003. Iit contains an ID,
> First_Name, and Last_Name.  In access i have set all three as key (i
[quoted text clipped - 15 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.