VB2005 Express Help!:)

Soldato
Joined
8 Oct 2003
Posts
2,897
Location
Glasgow
Hi

I tried to email my example home but i guess the works fw ate it :(

Anyway i am 'updating' one of our in house app's from VB6 -> Vb 2005 Express it uses an access databases on a remote share i am using DAO to query this database all is well however i cant 'INSERT' anything new into it i can read and update but when i try to insert VB debugs on me :) my codes is something like

rs = DBase.OpenRecordSet ( "INSET INTO Table1 (xxxxxx) VALUE ( xxxxx);") the rest of the code is borrowed from how i read data out so i know thats working it dies on the above line. Does anyone have a example of an insert using DAO i can borrow ? ive been googling all day at work can no decent results!:)

Cheers Kevin!
 
email from work showed up

Sub GetLastFaultID()
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim fld As DAO.Field
db = DBEngine.OpenDatabase("Dbase_Path")
rst = db.OpenRecordset( _
"SELECT tblFaults.fldFaultID FROM tblFaults;")
For Each fld In rst.Fields
Do While Not rst.EOF
intFaultID = fld.Value
intFaultID = intFaultID + 1
rst.MoveNext()
Loop
Next
rst.Close()
db.Close()
End Sub

i want to insert data using the same method :)
 
dont have a single example of ADO.net anywhere and have never used it :D, only have the offline help at work and when you type in ADO you just get concept stuff
 
Back
Top Bottom