OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Syntax error in Delete query

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Syntax error in Delete query
Page: [1]
 
lpdds

 

Posts: 31
Joined: 10/6/2002
Status: offline

 
Syntax error in Delete query - 7/31/2009 15:17:26   
I am getting a syntax error when I try to delete a record from an Access Database using FP03 using this custom query:

Delete * FROM [Patient]
WHERE [DateofAdmission]='::DateofAdmission::' and [PatientLastName]='::PatientLastName::' and [PatientFirstName]='::PatientFirstName::'

This is the error that is displayed when I verify the query:
Server error: Unable to retrieve schema information from the query:

SELECT * FROM * FROM [Patient]

against a database using the connection string

DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=Covermedoc/access_db/Data.mdb.

The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147217900 (0x80040e14)


The syntax seems correct. I there something that I am missing?
William Lee

 

Posts: 1273
Joined: 1/25/2002
From: Singapore
Status: offline

 
RE: Syntax error in Delete query - 8/1/2009 9:30:19   


quote:

ORIGINAL: lpdds

I am getting a syntax error when I try to delete a record from an Access Database using FP03 using this custom query:

Delete * FROM [Patient]
WHERE [DateofAdmission]='::DateofAdmission::' and [PatientLastName]='::PatientLastName::' and [PatientFirstName]='::PatientFirstName::'

The syntax seems correct. I there something that I am missing?

Remove the asterisk, like this:

Delete FROM [Patient]
WHERE [DateofAdmission]='::DateofAdmission::' and [PatientLastName]='::PatientLastName::' and [PatientFirstName]='::PatientFirstName::'

_____________________________

William Lee

pǝssǝɟoɹd-ɟ1ǝs ʎɥʇɹoʍʇsnɹʇ ʇsoɯ ɹnoʎ
nɹnb ǝsɐqɐʇɐp & dsɐ ,ʍɹp ,ǝbɐdʇuoɹɟ





(in reply to lpdds)
lpdds

 

Posts: 31
Joined: 10/6/2002
Status: offline

 
RE: Syntax error in Delete query - 8/1/2009 15:25:14   
Thank you for your reply. It worked. I like simple solutions.

(in reply to William Lee)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Syntax error in Delete query
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts