larsvandijk
Programmer
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"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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
---/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