p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   Visual Basic 2008 Essentials (http://p2p.wrox.com/visual-basic-2008-essentials-358/)
-   -   Updating access database (http://p2p.wrox.com/visual-basic-2008-essentials/86158-updating-access-database.html)

Ogeam85 December 26th, 2011 12:12 AM

Updating access database
 
Hi all, I am new in this forum but would love you to help me out here. I am writing an applcation to receive data from the serial port and save it to an access database. All the other aspect is workng well, but getting to update the database is where I am having problem. the section of the code for my database is here, please help me out.


Dim tempData As DataTable
tempData = Temp_DataDataSet.Tables("LoggerTable")

Dim tempCurrent As DataRow
' Obtain a new DataRow object from the DataTable.
tempCurrent = tblAuthors.NewRow()

' Set the DataRow field values as necessary.
tempCurrent("Date_And_Time") = Date.Now
tempCurrent("Temperature") = final_temp

'Pass that new object into the Add method of the DataTable.Rows collection.
tblAuthors.Rows.Add(tempCurrent)
OleDbDataAdapter1.Update(Temp_DataDataSet, "LoggerTable")
MsgBox("Add was successful.")


The problem is with that 2nd to the last line; the exception being thrown is "Parameter ?_1 has no default value."

Thanks for your help


All times are GMT -4. The time now is 09:53 AM.

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.