Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to insert values into an Access database record.
sql= "insert into ordereditems (orderid,mysize,priceperunit) values (" & orderid & "," & mysize & "," & price & "
"
set rsordereditems=db.execute(sql)
It only seems to work if the (" & orderid & "," & mysize & "," & price & "
values are numbers.
Like if I make mysize = 1,2,3, etc. for small, medium, large.
If mysize is a string then I get an error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
But if its a number then the database updates. I would like it to be a string.
Can someone help me out here?
Thanks in advance,
Sid
BTW, the access recordset entry for mysize is set up to be text data type.
sql= "insert into ordereditems (orderid,mysize,priceperunit) values (" & orderid & "," & mysize & "," & price & "
set rsordereditems=db.execute(sql)
It only seems to work if the (" & orderid & "," & mysize & "," & price & "
Like if I make mysize = 1,2,3, etc. for small, medium, large.
If mysize is a string then I get an error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
But if its a number then the database updates. I would like it to be a string.
Can someone help me out here?
Thanks in advance,
Sid
BTW, the access recordset entry for mysize is set up to be text data type.