Strange Problem with asp-sql statement

J

Jack

Hi,
I have a asp confirmation page using a asp-sql statement that updates a
database

However, there are few text fields which when left empty gives error
stating Access did not update field due to type conversion failure due to
key violation, lock violation or validation rule viaolation. However, when I
am filling the text boxes with any value the update takes place. I would
appreciate any help on why this is happening. The following is the sql
statement produced by response.write:

UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '$0.00' ,
tblGMISExpenditures_Quarter.LocalShare= '$0.00' ,
tblGMISExpenditures_Quarter.MBCCShare= '0' ,
tblGMISExpenditures_Quarter.UnpaidOblig= '$0.00' ,
tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '$0.00' ,
tblGMISExpenditures_Quarter.ProjectIncome= '$0.00' ,
tblGMISExpenditures_Quarter.ForfeitureIncome= '$0.00' ,
tblGMISExpenditures_Quarter.OtherExpense= '$0.00' ,
tblGMISExpenditures_Quarter.ForfeitureExpense= '$0.00' ,
tblGMISExpenditures_Quarter.InterestReceived= '$0.00' ,
tblGMISExpenditures_Quarter.TotalPeriodOutlay= '15769.27' ,
tblGMISExpenditures_Quarter.Remarks= ' ', tblGMISExpenditures_Quarter.Name=
'' , tblGMISExpenditures_Quarter.Title= '' ,
tblGMISExpenditures_Quarter.AreaCode= '' ,
tblGMISExpenditures_Quarter.Phone1= '' , tblGMISExpenditures_Quarter.Phone2=
'' , tblGMISExpenditures_Quarter.Date= '1/1/2005' where
tblGMISExpenditures_Quarter.SubgrantIntID = 5442;

The problems are with the following fields:

tblGMISExpenditures_Quarter.Name= ''
tblGMISExpenditures_Quarter.Title= ''
tblGMISExpenditures_Quarter.AreaCode= '' tblGMISExpenditures_Quarter.Phone1=
''
tblGMISExpenditures_Quarter.Phone2= ''
where if any value is put in each of the above fields then, there is error in
database update. Thanks
 
J

Jack

Thanks for your reply 'swp'. Please note that I got this problem resolved. It
was some minor error on my part that screwed up the sql statement. Regards.
 
B

Bob Lehmann

That is strange. Normally, some other information, beyond "there is error in
database update" is provided when an error occurs.

Bob Lehmann
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top