![]() |
|
![]() | ||
|
Subject:
Upload Comma Deliminated File From IIS Directory and Append Results to Sql Table
Category: Computers > Programming Asked by: pmclinn-ga List Price: $20.00 |
Posted:
13 Feb 2003 07:09 PST
Expires: 20 Feb 2003 13:31 PST Question ID: 160882 |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Upload Comma Deliminated File From IIS Directory and Append Results to Sql Table
From: stinger_60284-ga on 13 Feb 2003 07:51 PST |
What programming language you are using? I can give you an example how to import comma delimeted file into SQL server using ASP. Please confirm. |
Subject:
Re: Upload Comma Deliminated File From IIS Directory and Append Results to Sql Table
From: stinger_60284-ga on 13 Feb 2003 08:04 PST |
Since you mentioned IIS, I assume you are using ASP. Here is the code to get it: ... set fso = server.CreateObject("scripting.FileSystemObject") set f = fso.OpenTextFile("C:\YourPath\YourFileName", 1) ' 1: For Reading do until f.AtEndOfStream sContent = f.ReadLine arrField = Split(sContent, ",") iRecNumber = arrField(0) sName = arrField(1) sSQL = "INSERT INTO yourtableName(recordNumber,Name) " & _ "VALUES(" & iRecNumber & ", '" & sName & "')" ' Execute your SQL statement here .... loop f.Close set f = nothing set fso = nothing ... Hope that helps. |
Subject:
Re: Upload Comma Deliminated File From IIS Directory and Append Results to Sql Table
From: pmclinn-ga on 13 Feb 2003 08:05 PST |
VB and Javascript. I'm asking for you to give me an example? |
Subject:
Re: Upload Comma Deliminated File From IIS Directory and Append Results to Sql Table
From: pmclinn-ga on 13 Feb 2003 08:10 PST |
Would you finish this, looks good: Sql Server name is ServerName Table is TestingTable user is SA Pass is Test |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |