Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange ASP problem generating '80004005' code, need help here

Status
Not open for further replies.

larsvandijk

Programmer
Feb 21, 2002
3
NL
I have this code:

---/cut/---

Sub deltemp
sqlstr1 = "DELETE FROM tblBestelKopTemp, tblBestelRegelsTemp WHERE (((tblBestelKopTemp.SessionId)=""test""))"
ADOconn.execute(sqlstr1)
End Sub

---/cut/---

It is intend to delete all records of a user out of a temporary table(the table must remain, only records deleted).

It generates the error: [translated]:
"You have to specify the tabel from where you want to delete records.

So i modified the table statements from
tblBestelREgelsTemp to onderwijspers.tblBestelRegelsTemp etc, but then it generates the error:
"Can't find the file C:\onderwijspers.mdb"

So you would suspect that it lies within the connectionstrings wich is:

--/cut/--

Dim ADOconn, ADOrs, sqlstr1,sqlstr2
Dim objConn
Dim strDSN
Dim strSQL
Const adOpenStatic = 3
Const adLockReadOnly = 0
Set ADOconn = Server.CreateObject("ADODB.Connection")
ADOconn.Open "DSN=onderwijspers"

--/cut/--

But the strange thing is, i use the same connection string for a data-insert procedure, and it works fine.
So what am i doing wrong, i don't have any clue, and i'm at it for a day and a half now!
Regards,
Lars
 
You appear to be trying to delete records from two tables at the same time??? Can you do that. Mise Le Meas,

Mighty :)
 
Already solved the problem. Had something to do with the " and ' 's.
To answer your question, yes, you can do that :) Regards,
Lars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top