When i try to add the sample code u provided, the following error occured:
An unhandled exception of type 'System.Invalid OperationExcept ion' occurred in system.data.dll
Additional information: Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.
Code:
If IsNothing(DsTem pTransaction1) Then Exit Sub
currManager = CType(BindingCo ntext(DsTempTra nsaction1,...
User Profile
Collapse
-
-
updating MS Access table from datagrid
I'm using VB.net 2003. I can delete a row in datagrid (dgTempTransact ion), but my MS Access table can't directly being updated. The row i deleted is still exist in my MS Access, but in my datagrid, it already being deleted.
The table name in my MS Access: tableTempTransa ction.
Here is my code for that part...i don't know where is the error. Please help me..... Thanks anyway.
Dim currManager As CurrencyManager... -
Help please.....How to select a row from datagrid?
I have a datagrid in my program with the dataset is dsTempTransacti on. I want to select one row from that datagrid and then when i press a select button, the value i have selected will be copied into the textbox. Does anyone know how to do it? I really blank about this.
Thanks.... -
-
Insert Date into datagrid
Does anyone know how to insert date into vb.net datagrid by using INSERT INTO command?
From the code below, the error message is in cmd.ExecuteNonQ uery() line.
Here is the error message:
An unhandled exception of type 'System.Data.Ol eDb.OleDbExcept ion' occurred in system.data.dll
Dim today As Date
today = Date.Today
Dim str As String = "Provider=Micro soft.Jet.Oledb. 4.0;Data... -
-
How to display the arraylist contents into a table?
Is this forum also discussed about ASP.NET?
i'm currently using MS Visual Web Developer Express Edition. I have my arraylist below:
Public movie(10) As clsMovie
movie(0) = New clsMovie("VD01" , "Shrek", "Classic", "Available" , 2)
movie(1) = New clsMovie("DV01" , "Doraemon", "Premium", "Available" , 5)
... -
no, actually i just want to test whether my code works or not. if already can work, i can change it to the value i want.
Thanks...Leave a comment:
-
-
maybe that code is only for VB.net
because i try to run the code (from microsoft), with a bit changes by add a listbox (ListBox1) into the form:
Dim TestString As String = "apple pear banana "
Dim TestArray() As String = Split(TestStrin g)
' TestArray holds {"apple", "", "", "", "pear", "banana", "", ""}
Dim LastNonEmpty...Leave a comment:
-
hello Hariharanmca...
thanks a lot for your help.
now i can insert a record into the row already, but with the value that i already assigned (static).
but so sorry, i still have another question that i want to ask.
how to insert the value from a textbox into the table row?
because when i try this:
itemID = txtItemID.Text
insertCommand = "INSERT INTO tableTempTransa ction...Leave a comment:
-
i just use the login.mdb file because both the fields are in text.
And the value i want to insert into the row is also string. so i just use the tblLogin for trying to see whether the code works or not....Leave a comment:
-
i already changed the description to test1.
i use:
- test1 as a name for the txtItemDesc text field value
- itemID refers to the txtItemID text field value, and the ID is not integer, but string.
i pass in the query:
insertCommand = "INSERT INTO tblLogin (username, password) VALUES ('test1', 'itemID');"...Leave a comment:
-
it is still the same as before even i have changed the name "descriptio n" to "test1"
note: i only have one table (tblLogin) and one query (qryLogin) in MS Access.
both of them are empty....Leave a comment:
-
just like the above, there is no error message comes out, so i don't know what is the error.
after i run using "!" symbol, also no error....Leave a comment:
-
now i change the 'desc' to 'description', the same case happen again...i can't see my record inside the MS Access table...
Dim description, itemID As String...
itemID = txtItemID.Text
description = txtItemDesc.Tex t
Dim myOleDbConnecti on As OleDb.OleDbConn ection
Dim insertCommand As String
Dim myConnectionStr ing As String = "Provider=Micro soft.Jet.OLEDB. 4.0;DataLeave a comment:
-
Problem in inserting a new row in MS Access using VB.NET
Hello,
I'm new in vb.net. I have a problem in inserting a new row to a MS Access database table.
There is no error message comes out when i run my program, but when i check my MS Access table, there is no record inserted. So, i don't know which line is incorrect.
Here is my code:
Dim desc, itemID As String...
itemID = txtItemID.Text
desc = txtItemDesc.Tex t
No activity results to display
Show More
Leave a comment: