|
-
Oct 20th, 2002, 06:24 PM
#1
Thread Starter
Registered User
Working with command builders
Anyone used these or had any problems with them?
currently I am doing this:
Dim myConnection As New OdbcConnection(myConnectionStr)
Dim myDataAdapter As New OdbcDataAdapter()
Dim mySelectSQL As String = "select * from misc..tbl_Alerts"
myDataAdapter.SelectCommand = New OdbcCommand(mySelectSQL, myConnection)
Dim custCB As OdbcCommandBuilder = New OdbcCommandBuilder(myDataAdapter)
This all seems pretty standard and should flow on easily,
except this next line fails
Debug.WriteLine(custCB.GetUpdateCommand.ToString)
This is the error:
"Additional information: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any modifiable columns."
Now I am logging in as the admin of the database and so have complete permissions over creating and updating anything in the database, and I am not trying to modify the table, just get the command builder to generate the sql for me.
Anyone have a similar problem?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|