Custom data import to SQL via web form

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">&raquo;</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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top