J
Jonah Olsson
Hi guys,
Here's a problem:
My customer needs a way to import small Excel/Access-files of data into
their SQL Server. The data files all contains the same type of data; email
address, first name, last name and such basic contact information.
Now, if the data files to import would have the same field names as the ones
in the SQL Server database, this would not be a problem. But now they
differs. One file may have Swedish field names and another may have English.
How should I let the user decide which source field to be matched with the
destination?
I have the following:
I created a repeater that lists all available field names from the source
data file in the left column. The right column contains a dropdownlist of
all available destination field names for each source field. But how should
I then know what the user chose??
dt = ....
rptSourceFields.DataSource = dt.Columns
rptSourceFields.DataBind()
.....
<asp:Repeater ID="rptSourceFields" runat="server">
<itemtemplate>
<tr>
<td width="70"><%# Container.DataItem.ColumnName %></td>
<td width="15">»</td>
<td><asp:dropdownlist AutoPostBack="false" ID="mnuDestinationFields"
runat="server" /></td>
</tr>
</itemtemplate>
</asp:Repeater>
How should I do this? Am I doing it all wrong?
Thanks for any kind of help!
Best regards,
Jonah Olsson
Here's a problem:
My customer needs a way to import small Excel/Access-files of data into
their SQL Server. The data files all contains the same type of data; email
address, first name, last name and such basic contact information.
Now, if the data files to import would have the same field names as the ones
in the SQL Server database, this would not be a problem. But now they
differs. One file may have Swedish field names and another may have English.
How should I let the user decide which source field to be matched with the
destination?
I have the following:
I created a repeater that lists all available field names from the source
data file in the left column. The right column contains a dropdownlist of
all available destination field names for each source field. But how should
I then know what the user chose??
dt = ....
rptSourceFields.DataSource = dt.Columns
rptSourceFields.DataBind()
.....
<asp:Repeater ID="rptSourceFields" runat="server">
<itemtemplate>
<tr>
<td width="70"><%# Container.DataItem.ColumnName %></td>
<td width="15">»</td>
<td><asp:dropdownlist AutoPostBack="false" ID="mnuDestinationFields"
runat="server" /></td>
</tr>
</itemtemplate>
</asp:Repeater>
How should I do this? Am I doing it all wrong?
Thanks for any kind of help!
Best regards,
Jonah Olsson