|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simple query? Update Help Requested
I've been reading through various threads on this board, and seeing as how I'm new to Access/SQL on the web a lot of this is over my head. My problem might seem simple to someone here. However, I'm hoping that maybe some of you might be kind enough show me what I'm doing wrong.
I have a database on a webserver, and have had no problem setting up templates and queries to return results for site visitors. I am now experimenting with updating and deleting records from the database and have run into a snag. I am basically allowing a user to select a record via a query, and want to be able to allow them to update the data. I have setup a template which inputs the existing data into an html form. The user would then be allowed to see the existing values and update any that need it, or delete the record altogether. I already have the delete working, but I have been unsuccessful in getting the update function to work. In short: I need to be able to update multiple fields on a single record. The database is in MS Access 97 format. (don't ask) And this is pretty much what I have in my .IDC file: DataSource:testdb Template:update.htx SQLStatement: +UPDATE testdb SET Name='%Name%' and Status='%Status%' and DateJoined='%DateJoined%' and Locality='%Locality%' and Email='%Email%' and Notes='%Notes%' and TrialDateStart='%TrialDateStart%' and TrialDateEnd='%TrialDateEnd%' +WHERE ID='%ID%' I have tried "eq" instead of "=", I've tried with a SELECT statement and without. I have been unable to produce any results, and this is the error message I'm getting: Error Performing Query * [State=37000][Error=-3503][Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement. Anyone have any ideas? Thanks. |
|
#2
|
||||
|
||||
|
What server side language are you using to do this?? If it's ASP/PHP - there are a few tutorials on this DevArticles on how to perform inserts/updates - there are quite a few on the web in general too, as this is one of the first things you need to know for web development.
|
|
#3
|
|||
|
|||
|
Quote:
I'm using just HTML. In fact, I had looked all over the net for examples, and most of what I found were this simplified version: UPDATE table_name SET column_name = new_value WHERE column_name = some_value I have not yet found any more complex examples. Last edited by nsr : March 10th, 2004 at 10:32 AM. Reason: left out something |
|
#4
|
||||
|
||||
|
You can't be using just HTML. There has to be a programming language behind returning such results.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#5
|
|||
|
|||
|
Uhmmm I think you can use scripting for that. HTML alone... uhmmm.... never heard of it. Maybe HTML + ASP or + PHP
something like that... would be good. NHK Quote:
|
|
#6
|
|||
|
|||
|
No, I'm not using ASP or PHP.
The server is running MS XP, so we have IIS setup. The access database located on the server is queried from the website using SQL commands in the IDC file. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Simple query? Update Help Requested |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|