LethalPacifier
Programmer
I have a web form that accesses a MS Access (.mdb) file. The has on one table with a dozen columns and records. All columns are text. From the VB.Net page I issue an SQl UPDATE string that uses valuse from various controls on the page. The string is as follows:
(VB.Net):
Return "UPDATE AnalystList " & _
"SET AD_Domain = """ & tbDName.Text & """, " & _
"First_Name = """ & tbFName.Text & """, " & _
"Last_Name = """ & tbLName.Text & """, " & _
"Status = """ & status & """, " & _
"Status_Description = """ & tbStatusDescription.Text & """, " & _
"Work_Responsibility = """ & tbWorkResp.Text & """, " & _
"Administrator = """ & tmpAdmin & """, " & _
"Moderator = """ & tmpMod & """, " & _
"User = """ & tmpUser & """, " & _
"Date_Time = """ & Date.Now.ToString & """ " & _
"WHERE AD_Domain = """ & qsAgentDName & """;"
(Output when displayed):
UPDATE AnalystList
SET AD_Domain = "xxx1234",
First_Name = "Larry",
Last_Name = "Bird",
Status = "IN",
Status_Description = "Stuff",
Work_Responsibility = "Stuff",
Administrator = "N",
Moderator = "Y",
User = "Y",
Date_Time = "S"
WHERE AD_Domain="xxx1234";
There is a different string for different update privledge levels (Admin, Moderator, User). There above is Administrator and the only one I have a problem with. Moderator does not have "Admin", "Mod", and "User" fields and User also excludes "Work_Resp", "First_Name", and "Last_Name". When the User or Mod strings are sent the DB is always updated. When the Admin string is sent the DB has never updated. I appears to have something to do with the Admin, Mod, and User entries. They are text fields in Access with a 1-char max length. I have tried increasing and originally had then a type Yes/No set to True/False but delivering Boolean or Integer valuse never worked either.
Is there any reason or limitation for this not to work. Additionally, I have run the "Output) string from within Access and it worked. So I don't know if there is a type issue between VB.Net and Access or what.
Thanks in advance for any help and reading this.
(VB.Net):
Return "UPDATE AnalystList " & _
"SET AD_Domain = """ & tbDName.Text & """, " & _
"First_Name = """ & tbFName.Text & """, " & _
"Last_Name = """ & tbLName.Text & """, " & _
"Status = """ & status & """, " & _
"Status_Description = """ & tbStatusDescription.Text & """, " & _
"Work_Responsibility = """ & tbWorkResp.Text & """, " & _
"Administrator = """ & tmpAdmin & """, " & _
"Moderator = """ & tmpMod & """, " & _
"User = """ & tmpUser & """, " & _
"Date_Time = """ & Date.Now.ToString & """ " & _
"WHERE AD_Domain = """ & qsAgentDName & """;"
(Output when displayed):
UPDATE AnalystList
SET AD_Domain = "xxx1234",
First_Name = "Larry",
Last_Name = "Bird",
Status = "IN",
Status_Description = "Stuff",
Work_Responsibility = "Stuff",
Administrator = "N",
Moderator = "Y",
User = "Y",
Date_Time = "S"
WHERE AD_Domain="xxx1234";
There is a different string for different update privledge levels (Admin, Moderator, User). There above is Administrator and the only one I have a problem with. Moderator does not have "Admin", "Mod", and "User" fields and User also excludes "Work_Resp", "First_Name", and "Last_Name". When the User or Mod strings are sent the DB is always updated. When the Admin string is sent the DB has never updated. I appears to have something to do with the Admin, Mod, and User entries. They are text fields in Access with a 1-char max length. I have tried increasing and originally had then a type Yes/No set to True/False but delivering Boolean or Integer valuse never worked either.
Is there any reason or limitation for this not to work. Additionally, I have run the "Output) string from within Access and it worked. So I don't know if there is a type issue between VB.Net and Access or what.
Thanks in advance for any help and reading this.