Subject | DataSet + Firebird question |
---|---|
Author | ionut_ykm |
Post date | 2006-09-17T07:19:36Z |
I'm new in working with a database server, I use Firebird and with the
following code I've tried to insert a record into
a table,but it doesn't..., code gives no error, the connection is ok
with database,i can get actual records inserted with a firebird Manager.
Where did i go wrong ? Many thanks !!!
Dim oDataRow As DataRow
Dim ds As New DataSet
Dim wconn As New
FirebirdSql.Data.FirebirdClient.FbConnection("Server=localhost;User=SYSDBA;Password=masterkey;Database=fb1")
wconn.Open()
Dim objDS As New DataSet()
Dim wr As DataRow
Dim objSQLDA As New
FirebirdSql.Data.FirebirdClient.FbDataAdapter("SELECT * FROM tbl1;",
wconn)
objSQLDA.Fill(objDS)
wr = objDS.Tables(0).NewRow
wr("name") = "london"
objDS.Tables(0).Rows.Add(wr)
objDS.AcceptChanges()
objSQLDA.Update(objDS)
wconn.Close()
following code I've tried to insert a record into
a table,but it doesn't..., code gives no error, the connection is ok
with database,i can get actual records inserted with a firebird Manager.
Where did i go wrong ? Many thanks !!!
Dim oDataRow As DataRow
Dim ds As New DataSet
Dim wconn As New
FirebirdSql.Data.FirebirdClient.FbConnection("Server=localhost;User=SYSDBA;Password=masterkey;Database=fb1")
wconn.Open()
Dim objDS As New DataSet()
Dim wr As DataRow
Dim objSQLDA As New
FirebirdSql.Data.FirebirdClient.FbDataAdapter("SELECT * FROM tbl1;",
wconn)
objSQLDA.Fill(objDS)
wr = objDS.Tables(0).NewRow
wr("name") = "london"
objDS.Tables(0).Rows.Add(wr)
objDS.AcceptChanges()
objSQLDA.Update(objDS)
wconn.Close()