N
neilr
Can anyone help with some problkems that have wasted 2 days of my
(inexperienced) time already?
We have a website which allows people to register for events like
conferences
We are importing a table of fees for the apporpriate event using an Sp:
FeesDataSet = New System.Data.DataSet
Dim MySPcommand As New System.Data.SqlClient.SqlCommand
MySPcommand.CommandText = "SP4105201getWebFeeTable"
MySPcommand.CommandType = Data.CommandType.StoredProcedure
MySPcommand.Connection =
GlobalLeague.Utilities.Functions.GetConnection(True)
MySPcommand.Parameters.AddWithValue("@ProjectNo",
const_WarsawProjectNo)
Me.FeesDataSet.Tables.Add("Fees")
Me.FeesDataSet.Tables(0).Load(MySPcommand.ExecuteReader())
MySPcommand.Connection.Close()
MySPcommand = Nothing
So far, so good. We then need to add a couple of "discretionary fees"
if the customer selects the approriate boxes on the page. We get a
single row of data (same format but different SP) and ideally need to
add that row to the "Fees" table. I can get it into another table (same
method as above) or into a datareader, but cannot find exactly how to
add it as a row into the "Fees" table from either the new table or from
a datareader?
A little later, we use the controls on the web page to pick up the
customer's options and I am storing these by changing the (existing)
"Pick" field in the "Fees" table to 1 for the appropriate rows (ie
fees). I can then get use:
FeesDataSet.Tables("Fees").Select("Pick = 1")
to get a set of rows which we need to charge to this customer. Ideally
I want to move these to another table ("Charges") in the same dataset,
so that we can perform various calculations and text changes on them
before printing them to his invoice. I have tried cloning the table to
set the schema for the "Charges" table to match the "Fees" table and
then import the rows, but I cannot seem to get the code right.
Can anyone help me with these 2 tasks - ie getting a row from a table
or datareader and copying it into the "Fees" table, asnd then taking a
set of selected rows from the "Fees" table and using them to create the
"Charges" table?
(inexperienced) time already?
We have a website which allows people to register for events like
conferences
We are importing a table of fees for the apporpriate event using an Sp:
FeesDataSet = New System.Data.DataSet
Dim MySPcommand As New System.Data.SqlClient.SqlCommand
MySPcommand.CommandText = "SP4105201getWebFeeTable"
MySPcommand.CommandType = Data.CommandType.StoredProcedure
MySPcommand.Connection =
GlobalLeague.Utilities.Functions.GetConnection(True)
MySPcommand.Parameters.AddWithValue("@ProjectNo",
const_WarsawProjectNo)
Me.FeesDataSet.Tables.Add("Fees")
Me.FeesDataSet.Tables(0).Load(MySPcommand.ExecuteReader())
MySPcommand.Connection.Close()
MySPcommand = Nothing
So far, so good. We then need to add a couple of "discretionary fees"
if the customer selects the approriate boxes on the page. We get a
single row of data (same format but different SP) and ideally need to
add that row to the "Fees" table. I can get it into another table (same
method as above) or into a datareader, but cannot find exactly how to
add it as a row into the "Fees" table from either the new table or from
a datareader?
A little later, we use the controls on the web page to pick up the
customer's options and I am storing these by changing the (existing)
"Pick" field in the "Fees" table to 1 for the appropriate rows (ie
fees). I can then get use:
FeesDataSet.Tables("Fees").Select("Pick = 1")
to get a set of rows which we need to charge to this customer. Ideally
I want to move these to another table ("Charges") in the same dataset,
so that we can perform various calculations and text changes on them
before printing them to his invoice. I have tried cloning the table to
set the schema for the "Charges" table to match the "Fees" table and
then import the rows, but I cannot seem to get the code right.
Can anyone help me with these 2 tasks - ie getting a row from a table
or datareader and copying it into the "Fees" table, asnd then taking a
set of selected rows from the "Fees" table and using them to create the
"Charges" table?