Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Could not delete from specified tables


Message #1 by "Tyler Zawacki" <Sober_Analyst@h...> on Tue, 26 Feb 2002 11:41:14
Hello ... i got a file called "test.asp"



i can select but i cannot delete from a database called "test.mdb"



i'm running:



Windows XP

Access 2002

IIS 5.1

.NET Framework







here is the contents of my file ...



**************************************************



<%

Dim strConnection

Dim objConn

Dim sqlGetAllRecords

Dim rsGetAllRecords



strConnection = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Test.mdb;"



Set objConn = Server.CreateObject("ADODB.CONNECTION")

    objConn.Mode = 3      '3 = adModeReadWrite

	objConn.Open strConnection

	

	



sqlGetAllRecords = "Select * from tblTest"

Set rsGetAllRecords = objConn.execute(sqlGetAllRecords)	

	

	

sqlGetAllRecords = "Delete * from tblTest"

'objConn.Execute sqlGetAllRecords

Set rsGetAllRecords = objConn.execute(sqlGetAllRecords)

%>

	

**************************************************





i even put the database at the root ... i changed IIS 5.1 to allow Read 

and Write ... i'm going crazy trying to figure out why it's selecting but 

not Deleting!! ... here is my error message ...





Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified 

tables.

/test.asp, line 21
Message #2 by Eli Schilling <eschilli@t...> on Tue, 26 Feb 2002 08:16:53 -0800
Tyler,  your delete string is incorrect.



If you want to delete EVERYTHING in a table:



"delete table_name"  //this won't delete the table, just everything in it.



If you want to records based on specific criteria:



"delete tablename where column_name = 'value'"



Give that a shot and see how it works.



Cheers,

Eli





-----Original Message-----

From: Tyler Zawacki [mailto:Sober_Analyst@h...]

Sent: Tuesday, February 26, 2002 3:41 AM

To: ASP Database Setup

Subject: [asp_database_setup] Could not delete from specified tables





Hello ... i got a file called "test.asp"



i can select but i cannot delete from a database called "test.mdb"



i'm running:



Windows XP

Access 2002

IIS 5.1

.NET Framework







here is the contents of my file ...



**************************************************



<%

Dim strConnection

Dim objConn

Dim sqlGetAllRecords

Dim rsGetAllRecords



strConnection = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Test.mdb;"



Set objConn = Server.CreateObject("ADODB.CONNECTION")

    objConn.Mode = 3      '3 = adModeReadWrite

	objConn.Open strConnection

	

	



sqlGetAllRecords = "Select * from tblTest"

Set rsGetAllRecords = objConn.execute(sqlGetAllRecords)	

	

	

sqlGetAllRecords = "Delete * from tblTest"

'objConn.Execute sqlGetAllRecords

Set rsGetAllRecords = objConn.execute(sqlGetAllRecords)

%>

	

**************************************************





i even put the database at the root ... i changed IIS 5.1 to allow Read 

and Write ... i'm going crazy trying to figure out why it's selecting but 

not Deleting!! ... here is my error message ...





Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified 

tables.

/test.asp, line 21




$subst('Email.Unsub')






$subst('Email.Unsub').


  Return to Index