Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error - insert data in a table ...

Status
Not open for further replies.

miglou

Programmer
May 28, 2002
37
PT
Hello
i have one form without RecordSource information, i consult one table and check user/password, but after that i want to insert data in one table, using:

Dim strSQL As String
strSQL = "INSERT INTO prod(day,op) VALUES (" & d & ",'" & o & "')"
Dim conDatabase As ADODB.Connection
Dim rstNew As ADODB.Recordset
Set conDatabase = CurrentProject.Connection
Set rstNew = New Recordset
rstNew.Open strSQL, conDatabase, adOpenDynamic, adLockOptimistic

and i got an error message:

run-time error -2147217904(80040e10)
No value given for one or more required parameters


.....is it necessary to have a link to a recordSource?? there is any way to do that without that link???

T.Y.
 
Hi,

You are establishing the connection to the db which is fine. The question to ask is: Are you sure that your parameters: d and o are not null? That is usually one of the causes for the few parameters error.

Have a good one!
BK
 
well... yes, but i solved problem with different approach.
thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top