Utnapishtim
IS-IT--Management
Okay - I give up. I have two sql tables (Payment and ReturnHeader); ReturnHeader is indexed by ContentLocation, Payment is indexed by RequestedSettlement Date & ContentLocation. I need the resulting dataset to be sequenced by Payment.RequestedSettlementDate.
While the following code executes without error, the dataset remains sequenced by ContentLocation. Note: I've tried this with and without the AddWithKey line that is commented out below. Help!
Dim PaySqlStatement = "Select Payment.*, ReturnHeader.ContentLocation, ReturnHeader.ElectronicPostmark as ElectronicPostmark from ReturnHeader, Payment where ReturnHeader.ContentLocation = Payment.ContentLocation order by Payment.RequestedSettlementDate;"
SelectTable(PaySqlStatement)
.
.
.
SelectTable(PaySqlStatement)
myConnection = New SqlConnection("server=(local)\NetSDK;Trusted_Connection=yes;database=xyz")
PaymentSqlDataAdapter = New SqlDataAdapter(PaySqlStatement, myConnection)
PaymentRowsCommandBuilder = New SqlCommandBuilder(PaymentSqlDataAdapter)
'PaymentSqlDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
PaymentSqlDataAdapter.Fill(PaymentDataSet, "Payment")
While the following code executes without error, the dataset remains sequenced by ContentLocation. Note: I've tried this with and without the AddWithKey line that is commented out below. Help!
Dim PaySqlStatement = "Select Payment.*, ReturnHeader.ContentLocation, ReturnHeader.ElectronicPostmark as ElectronicPostmark from ReturnHeader, Payment where ReturnHeader.ContentLocation = Payment.ContentLocation order by Payment.RequestedSettlementDate;"
SelectTable(PaySqlStatement)
.
.
.
SelectTable(PaySqlStatement)
myConnection = New SqlConnection("server=(local)\NetSDK;Trusted_Connection=yes;database=xyz")
PaymentSqlDataAdapter = New SqlDataAdapter(PaySqlStatement, myConnection)
PaymentRowsCommandBuilder = New SqlCommandBuilder(PaymentSqlDataAdapter)
'PaymentSqlDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
PaymentSqlDataAdapter.Fill(PaymentDataSet, "Payment")