Thanks for responding; I appreciate it.
I'm using the following code to try to figure out what I'm doing. It is not
meant to be complete and certainly is not.
**********************************************
Public Shared Sub UpdateClaimForm(ByVal claimsFormData As DataTable)
Dim sqlQuery As New StringBuilder
sqlQuery.Append("INSERT SUP_CLAIM_FORMS")
sqlQuery.Append(" SET FORM_NUMBER = 'WB3',")
sqlQuery.Append(" FORM_NAME = 'My Form',")
sqlQuery.Append(" FORM_PATH_FILE_NM = 'WB3.xml',")
sqlQuery.Append(" FORM_STATE_CD = 'IL'")
' create an instance of the DB2Database class (Data Access
Enterprise Library) and DBCommandWrapper
Dim ClaimDatabase As DB2Database =
DirectCast(DatabaseFactory.CreateDatabase, DB2Database)
Dim UpdateClaimDataCmd As DBCommandWrapper =
ClaimDatabase.GetSqlStringCommandWrapper(sqlQuery. ToString)
Dim trans As IDbTransaction =
ClaimDatabase.GetConnection().BeginTransaction()
' update dataset
Dim ds As New DataSet
ds.Tables.Add(claimsFormData)
ClaimDatabase.UpdateDataSet(ds, claimsFormData.TableName, ???,
UpdateClaimDataCmd, ???, trans)
UpdateClaimDataCmd.Dispose()
End Sub
**********************************************
--
Joe
"mnichols" wrote:
Which class/interface are you using?
Joe wrote: Hello All:
I am trying to use the Enterprise Libraries created by Microsoft to update a
DB2 database and am stuck. I need to be able to Insert, Update and Delete
records from the DB2 datbase tables. I can use the UpdateDataSet method to
do this, but I am not sure how to use it. I have Googled the method and
haven't relly found anything helpful. Here's one question:
The method takes several parameters, among them an insert command, update
command and delete command. How does the method know which command to
execute? Does anyone know of a good online example of this code?
Any help would be greatly appreciated.
Thanks,