Syntax error with SaveChanges
Posted: Thu 12 Dec 2013 22:36
I am trying to insert a new record, but when I execute SaveChanges, I get an error saying "Syntax error at or near "("". The data that I am submitting looks okay, and all the non-nullable fields are filled in (except for one sequence field that Postgres generates itself). I'd like to know either how to fix this error or see what the SQL is that is being submitted. Here is the code I am running:
Dim newacct As New OnlineEnrollment.onlineaccount
newacct.custnum = Me.custnum
newacct.emailaddress = Me.email(0).email
newacct.lastname = Me.lname
newacct.firstname = Me.fname
newacct.password = GenerateRandomString(8, True)
newacct.datecreated = Now
olEnr.onlineaccounts.AddObject(newacct)
olEnr.SaveChanges()
Any ideas on solving this problem?
Kevin Clark
Dim newacct As New OnlineEnrollment.onlineaccount
newacct.custnum = Me.custnum
newacct.emailaddress = Me.email(0).email
newacct.lastname = Me.lname
newacct.firstname = Me.fname
newacct.password = GenerateRandomString(8, True)
newacct.datecreated = Now
olEnr.onlineaccounts.AddObject(newacct)
olEnr.SaveChanges()
Any ideas on solving this problem?
Kevin Clark