Advertisement

05.15.2008 at 05:00PM PDT, ID: 23407090
[x]
Attachment Details

Error updating datatable "Dynamic SQL generation is not supported against multiple base tables"

Asked by Netlink2 in .NET, Microsoft Visual Basic.Net

I load a datagridview using the same SQL statement as attached and would like to update any changes to the original tables. I actually only make changes to data in one of the tables.Start Free Trial
1:
2:
3:
4:
5:
strSQL = "SELECT [tblClient].[id], [tblClient].[clientid], [tblClient].[firstname], [tblClient].[lastname], [tblClientMessage].[id] AS messageid, [tblClientMessage].[CID], [tblClientMessage].[Msg], [tblClientMessage].[DtCld], [tblClientMessage].[TMCld], [firstname] + " & " " & " + [lastname] AS client1, [tblClient].[pfirstname] + " & " " & " + [plastname] AS client2" & " FROM tblClient INNER JOIN tblClientMessage ON [tblClient].[id]=[tblClientMessage].[CID]" & " WHERE tblClient.id = " & clientid & " ORDER BY [tblClientMessage].[DtCld] DESC , [tblClientMessage].[TMCld] DESC" '[tblClientMessage.id DESC"
                    adapter.SelectCommand.CommandText = strSQL
                    adapter.SelectCommand.CommandType = CommandType.Text
                    cb.RefreshSchema()
                    adapter.Update(dtNotices)
[+][-]05.16.2008 at 04:40AM PDT, ID: 21581825

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Microsoft Visual Basic.Net
Sign Up Now!
Solution Provided By: athapa
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628