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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to get update query to work

Status
Not open for further replies.

utahjzz98

Programmer
Jan 9, 2003
69
US
I am attempting to use the SQL update command in an .asp page connected to an Access db. Regardless of whether I try to use the SQL update command in the .asp page, or an update query in Access, it is not updating any data. When I run the query in Access I get the message, "You are about to update 0 rows". Usually if my update queries are successful I get, "You are about to update 1 rows". I have listed the code for my query below. My original thought was that maybe the data I was using to update the database was the same as the data existed, therefore it wasn't really an update. However, I tried a variety of combonations to ensure the data was different. Any help would be appreciated.

UPDATE tblMasterSiteList
SET SprintPrivateLine='416097',
BiOrInCode='',
TsnRouterWirelessIp='',
TelcoId='',
SchedOpHandoff='9/23/2003',
WirelessControllerOutsideIP='',
LecCircuitDate='8/29/2003',
PM='',
NetworkBroadcast='',
SurveyEngr='',
SubnetMaskForTsnSide='',
SiteSurveyDate='5/26/2003',
VpnSideNetworkID='',
SurveyCpeMDR='',
TsnRouterIpForVpnDevice='',
TsnRouterSerialIP='',
VpnDeviceOutsideIP='',
TsnRouterMask='',
VpnLanUsableIp='',
TsnIpAllocation='',
VPNDeviceMask='',
InstallCpeMDR='',
NetworkID=''
WHERE TsnID=1001
 
Try putting single quotes around 1001 on your where statement:

UPDATE tblMasterSiteList
SET SprintPrivateLine='416097',
BiOrInCode='',
TsnRouterWirelessIp='',
TelcoId='',
SchedOpHandoff='9/23/2003',
WirelessControllerOutsideIP='',
LecCircuitDate='8/29/2003',
PM='',
NetworkBroadcast='',
SurveyEngr='',
SubnetMaskForTsnSide='',
SiteSurveyDate='5/26/2003',
VpnSideNetworkID='',
SurveyCpeMDR='',
TsnRouterIpForVpnDevice='',
TsnRouterSerialIP='',
VpnDeviceOutsideIP='',
TsnRouterMask='',
VpnLanUsableIp='',
TsnIpAllocation='',
VPNDeviceMask='',
InstallCpeMDR='',
NetworkID=''
WHERE TsnID='1001';

Good Luck,
Hap [2thumbsup]


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top