HI
I am having a problem with asp and sql statement, the below script
works fine with access database at back, however, if I
put with sql server, I got an error states, do you guys have any idea,
please help me out, thanks in advance
wei
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect
syntax near '*'.
/test/jobpost/deljob.asp, line 24
'------------------------------------------------------------------------------------
<%
Set strConn = Server.CreateObject("ADODB.Connection")
strConn.Open "Driver={SQL Server};" & _
"Server=xxxxxxxxx;" & _
"Database=xxxxxxxxx;" & _
"Uid=xxxxxxxx;" & _
"Pwd=xxxxxxxx;"
%>
<% 'Set connCW = Server.CreateObject("ADODB.Connection") %>
<% 'connCW.Open ="Driver={Microsoft Access Driver (*.mdb)}; " &_
' "DBQ=" & Server.Mappath("job.mdb") %>
<%
num = Request.Form("num")
FOR I= 1 TO num
strID= Request.Form("ID" & I)
chrDel= Request.Form("del" & I)
IF chrDel <> "" THEN
strSQL = "DELETE * FROM position " &_
"WHERE ID = " & strID
SET rs = strConn.execute(strSQL)
End If
NEXT
strSQL = "SELECT * FROM position"
SET rsd = strConn.execute(strSQL)
If rsd.EOF Then
response.write("You have no transaction.")
Else
%>
<% End If %>