|
| |
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
Edit/Delete records - 2/16/2002 11:17:56
Can someone tell me what the code would be to edit a post in a webdatabase? I'm guessing a simalar code would be used to delete a record.
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/18/2002 17:03:34
Alright, I used the microsoft link and the fields transfer to the new page (on win 2k but does not work on unix) but i cant figure out how to get it to save to the database. Here is the url if someone could check out what im doing wrong http://www.glencoechamber.com/update_cal.asp and http://www.glencoechamber.com/update.asp to view the scource on either of the two pages change the extention to htm.
|
|
|
|
Mojo
Posts: 2431 From: Chicago Status: offline
|
RE: Edit/Delete records - 2/18/2002 18:15:13
The links above are pretty good. What are you having trouble with? Joe
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/20/2002 14:44:29
Well no luck yet. Nothing works right. I get a: Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument _fpclass/fpdbrgn1.inc, line 211 and the sql on microsofts website and this website doesnt want to work right for me. Can someone please come to my level with this??
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/21/2002 11:45:37
I've tried: delete DISTINCTROW * FROM CALENDAR ::event_name::::event_time::::misc::::browser:: and that deletes all the records in the database. I've tried this: UPDATE results SET posted_by='::posted_by::',event_name='::event_name::' WHERE event_date='::event_date::' and event_disc='::event_disc::' but this gives me an error: Database Results Error Description: [Microsoft][ODBC dBase Driver] The Microsoft Jet database engine could not find the object 'results'. Make sure the object exists and that you spell its name and the path name correctly. Number: -2147217865 (0x80040E37) Source: Microsoft OLE DB Provider for ODBC Drivers One or more form fields were empty. You should provide default values for all form fields that are used in the query. If i use the sugestion from microsoft: Double-click Submit and change the Value/Label field to Update . Right-click inside the form and then click Form Properties on the menu that appears. In the Form Properties dialog box, select Send to other , and then click Options . In the Action box, type Update.asp . Click OK twice and save the page as Update_Form.asp. It sends all the information i want to change to the form fields on page 2 but i have no idea how to save it from there to the database.
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit/Delete records - 2/21/2002 13:43:03
To delete, you need to specify a record : delete FROM CALENDAR where [uniqueID] = xx To update, youll need to ensure column types are correct, and ' is used on text fields only. Is results the name of the table? youve used calendar in the previous example? §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/21/2002 18:46:27
The name of the database is calendar. How can I tell it to look at one record? I'm using an external database and its not writing an autonumber in any of the feilds. I copied the code you put in the last message and i keep getting this message Database Results Error Description: [Microsoft][ODBC dBase Driver] Too few parameters. Expected 2. Number: -2147217904 (0x80040E10) Source: Microsoft OLE DB Provider for ODBC Drivers I tried: delete FROM CALENDAR where [uniqueID] = xx and delete FROM CALENDAR where [event_name] = xx and delete FROM CALENDAR where [event_name] = event_name I'm just not getting it. Watch, after i get it to work on my computer (win 2k with iis) it will not work on my unix webhost.
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit/Delete records - 2/21/2002 20:09:30
You are kidding arent you? No, it wont work on your unix host. Access as a database will only work on an NT host, and more often than not, asp wont work on Unix either. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/21/2002 20:54:01
well im not sure what it is. Its really not mine, Im helping someone build a site. The specs can be found at http://cobalt04.lakes.com Its runing asp pages and posting messages just fine. If its not possible to edit/delete posts to the database what would you seguest we do?
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/22/2002 16:44:20
Alright. I got the records to delete correctly with windows iis, but i get a message when i upload it to the sever. I have it set up so that on page one you scroll through the records until you find the one you want to delete. By pressing a button (delete record) it goes to a second page that transfers all the information from the record to the second page. Then after pressing delete its gone... but with this server im uploading to i dont think it accepts sql. Or anything like that. Here is the sql that i used on the second page: DELETE FROM CALENDAR where event_name='::event_name::' and event_disc='::event_disc::' Please help if you can.
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit/Delete records - 2/22/2002 22:18:22
Youll find with 99% certainty that a colbalt box wont run access as a database. You can use mysql, but youd need to manually set that up. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/23/2002 11:50:09
So what your saying is that it can proccess the data to write to an external database such as dbase 5 but there is no way from the web to delete those posts right? The service provider wont help me do anything, so I have to do as much as i can on my end. I guess thats why its a free service.
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit/Delete records - 2/23/2002 14:36:37
From what I understand, you are doing 2 things. 1) Testing this code on your windows server and having problems with delete etc. 2)Wanting to upload to Cobalt when finished and have it work. Is that correct? If so, what Im saying, is whilst the code should work, you cant use access as a database. §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
nmathews
Posts: 50 Joined: 2/10/2002 From: Status: offline
|
RE: Edit/Delete records - 2/23/2002 15:03:52
The code works great on my windows websever. I've exported my database from access and it is now a dbase 5 file that runs on the colbolt server just fine. But yes I want it to work when I'm done. Or at least I would like it to work.
|
|
|
|
Spooky
Posts: 26599 Joined: 11/11/1998 From: Middle Earth Status: offline
|
RE: Edit/Delete records - 2/23/2002 16:29:52
With the new server, youll need to change the connection string to locate the new database. (Ive never use that type, or on a unix, so its new territory here!) §þððk¥ Database / DRW Q & A VP-ASP Shopping cart Spooky Login
|
|
|
|
William Lee
Posts: 1041 Joined: 1/25/2002 From: Singapore Status: offline
|
RE: Edit/Delete records - 2/23/2002 17:07:22
A few things I would suggest mmathews look into: 1. ASP on MS Servers use VBScript by default, not sure if ChilliSoft! ASP follows suit or the Cobalt servers are cfg Javascript as the default scripting language. If mmathews did not specify VBScript in his asp pages, well.. maybe the DRW did. 2. Make sure ADO is included on the server. Ask the host. 3. Does the host support the DSNless method by FP or the global.asa(this is where the default scripting language is specified) Not all ASP host do, I know Brinkster don't. William Lee
|
|
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
|
|
|