|
-
Mar 14th, 2010, 06:39 PM
#1
Member
Re: Retrieving and Saving Data in Databases
I am having some problems:
vb Code:
Using connection As New OleDbConnection(myConnectionString) Using adapter As New OleDbDataAdapter("SELECT NameFirst, NameLast FROM Employees", _ connection) Dim insert As New OleDbCommand("INSERT INTO Employees (NameFirst, NameLast) VALUES (@NameFirst, @NameLast)", _ connection) adapter.InsertCommand = insert adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey Dim table As New DataTable adapter.FillSchema(table, SchemaType.Source) Dim row As DataRow = table.NewRow() row("NameFirst") = aName(0) row("NameLast") = aName(1) table.Rows.Add(row) adapter.Update(table) End Using End Using
I am getting an error with this line:
adapter.Update(table)
error:
No value given for one or more required parameters.
-
Mar 9th, 2011, 10:33 AM
#2
New Member
Re: Retrieving and Saving Data in Databases
 Originally Posted by dethredic
I am having some problems:
vb Code:
Using connection As New OleDbConnection(myConnectionString)
Using adapter As New OleDbDataAdapter("SELECT NameFirst, NameLast FROM Employees", _
connection)
Dim insert As New OleDbCommand("INSERT INTO Employees (NameFirst, NameLast) VALUES (@NameFirst, @NameLast)", _
connection)
adapter.InsertCommand = insert
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
Dim table As New DataTable
adapter.FillSchema(table, SchemaType.Source)
Dim row As DataRow = table.NewRow()
row("NameFirst") = aName(0)
row("NameLast") = aName(1)
table.Rows.Add(row)
adapter.Update(table)
End Using
End Using
I am getting an error with this line:
adapter.Update(table)
error:
No value given for one or more required parameters.
Hi,
I'm using DotNetNuke CMS and working on some modules using VB.Net. I have a Datagrid "telerik:RadGrid" and I'm trying to add textbox to filter the rows base on the value that is written in the text box:
I defined the following:
Dim dv As DataView = New DataView()
dv.Table = ?
dv.RowFilter = "Name like '" & TextBox2.Text & "%'"
RadGrid1.DataSource = dv
I have a problem in setting the value of the dv.Table=?
Can you please guide me to the value that should be there
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|