J
Julian
Hi
I am trying to update a date field in my table but some how this simple code
does not work, I know the select work because if I write the fields, it will
show the data from the table but why the update does not work?
<%
Set ConnGallery = Server.CreateObject("ADODB.Connection")
ConnGallery.Open ConnectionString
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set CmdUpdateAd = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT Ads.* FROM Ads WHERE Advertiser=0 "
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = ConnGallery
CmdUpdateAd.Open cmdTemp, , 1, 3
CmdUpdateAd.Fields("Ad_Expires") = " "
CmdUpdateAd.Update
CmdUpdateAd.Close
response.Write ("hej")
%>
I am trying to update a date field in my table but some how this simple code
does not work, I know the select work because if I write the fields, it will
show the data from the table but why the update does not work?
<%
Set ConnGallery = Server.CreateObject("ADODB.Connection")
ConnGallery.Open ConnectionString
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set CmdUpdateAd = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT Ads.* FROM Ads WHERE Advertiser=0 "
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = ConnGallery
CmdUpdateAd.Open cmdTemp, , 1, 3
CmdUpdateAd.Fields("Ad_Expires") = " "
CmdUpdateAd.Update
CmdUpdateAd.Close
response.Write ("hej")
%>