E
Emmett Power
Hi,
I have a form with a table with two fields SelectionID and Experience.
I am posting the data to a database using an array function. I have
set out the code below.
The problem I am having is where the Experience field is blank I get
an Microsoft OLE DB Provider for ODBC Drivers error '80040e21'. It
makes sense that a null value would cause the function problems.
I am sure that there is a very simple technique for getting around
this problem but so far my tinkering with the code hasn't come up with
it.
Any suggestions as to how to get around this would be much
appreciated.
With regards
Emmett Power
CODE
----
DIM arrSelectionID, arrExperience, i
DIM vrsSelection, Experience
DIM sqlString
Set objConn = Server.CreateObject("ADODB.Connection")
ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("../../fpdb/Database.mdb")
objConn.Open ConnectionString
arrSelectionID= split(request("SelectionID"),",")
arrExperience= split(request("Experience"),",")
for i = 0 to ubound(arrSelectionID)
vrsSelectionID = arrSelectionID(i)
vrsExperience = arrExperience(i)
sqlString = "UPDATE Selection SET
Experience='"&Trim(vrsExperience)&"' WHERE SelectionID
="&vrsSelectionID&""
objConn.Execute(sqlString)
next
%>
I have a form with a table with two fields SelectionID and Experience.
I am posting the data to a database using an array function. I have
set out the code below.
The problem I am having is where the Experience field is blank I get
an Microsoft OLE DB Provider for ODBC Drivers error '80040e21'. It
makes sense that a null value would cause the function problems.
I am sure that there is a very simple technique for getting around
this problem but so far my tinkering with the code hasn't come up with
it.
Any suggestions as to how to get around this would be much
appreciated.
With regards
Emmett Power
CODE
----
DIM arrSelectionID, arrExperience, i
DIM vrsSelection, Experience
DIM sqlString
Set objConn = Server.CreateObject("ADODB.Connection")
ConnectionString="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("../../fpdb/Database.mdb")
objConn.Open ConnectionString
arrSelectionID= split(request("SelectionID"),",")
arrExperience= split(request("Experience"),",")
for i = 0 to ubound(arrSelectionID)
vrsSelectionID = arrSelectionID(i)
vrsExperience = arrExperience(i)
sqlString = "UPDATE Selection SET
Experience='"&Trim(vrsExperience)&"' WHERE SelectionID
="&vrsSelectionID&""
objConn.Execute(sqlString)
next
%>