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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database problem...

Status
Not open for further replies.

DigitalGeek

Programmer
Jul 31, 2003
17
CA
with the following code...
imports System.Data
Imports System.Data.Oledb
.
.
.
dim dradotst as OleDbDataReader

connadotst.Open()
Try
dradotst = Me.OleDbSelectCommand1.ExecuteReader(CommandBehavior.CloseConnection)
Catch oledbexception As Exception
MsgBox(oledbexception.Message)
End Try
.
.
.




i get the message...
"No value given for one or more required parameters."


...help....

it worked until I added code in a seperate sub to update the dataset and database?????


 
do you use parameters in OleDbSelectCommand1's select command?
 
what parameters? I coppied the example from a book... this works in another program I have written...

it even worked in this program...
 
I understand that you don't use parameters. if we put aside the parameters, this may occur in a few conditions. one is a wrong fieldname or if you're using a case sensitive DB and if your command is not case sensitive.
but i can not help you further unless i see the select command. if you post it i think i can help more.

have a nice day

@li
 
I created the connection, adapter, and dataset using the IDE...


'OleDbSelectCommand1
'
Me.OleDbSelectCommand1.CommandText = "SELECT Article, Code, Desciption FROM Articles"
Me.OleDbSelectCommand1.Connection = Me.adotstolec

I don't know if this is what your looking for?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top