Ask a Question related to ASP Database, Design and Development.
-
Dan #1
Inserting data from text file into database
Is it possible to write a script in an ASP page that reads a comma delimited text file and inserts the data row by row into an Access db? Each comma delimit in the text file represents one field in the db table.
Dan Guest
-
i want to display all the data in the database to the text field
Well, I have 5 data in the database list(gDatabase), i want to display them all on the member("datafield").. when I used the repeat function, it... -
Inserting data from a form to an MS access database
I'm new to coldfusion, and have run into a problem when trying to insert data from a basic HTML form into an MS Access database. The problem is... -
Trouble inserting data in database
I use DW 2004, XP with sp2, and Access 2003. Im planning to make a site that is possible to log in and update news from the web. So I have made a... -
getting text file into database automatically
mk, "TransferText" can either be a macro action or a VBA method. The place to begin your research would be to investigate TransferText. -... -
Importing a text file into a database
Hi If you are sure that the imported field names (BRO_CODE1, BRO-CODE1, BROCH_CODE1, etc) are *exactly* the same as your table field... -
Bob Barrows [MVP] #2
Re: Inserting data from text file into database
Dan wrote:
Yes, but it's easier to use Access' built-in import functionality to do> Is it possible to write a script in an ASP page that reads a comma
> delimited text file and inserts the data row by row into an Access
> db? Each comma delimit in the text file represents one field in the
> db table.
this.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] Guest
-
Bullschmidt #3
Re: Inserting data from text file into database
<<
Is it possible to write a script in an ASP page that reads a comma
delimited text file and inserts the data row by row into an Access db?
Each comma delimit in the text file represents one field in the db
table.You can connect to a csv file (which can be opened in Excel and which an>>
Excel file can be converted into) in good form just as you can to a
regular database.
The .csv file needs to be uploaded to the server.
And you can have two recordsets open at the same time.
So I'd suggest going through this recordset one row at a time and within
this loop add a new record to the "real" database's recordset.
And for help connecting to a text file using the Jet OLE DB provider:
[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#O[/url]
LEDBProviderForMicrosoftJetText
And based on the above link realize that the actual filename does NOT go
in the connection string - rather it goes in the SQL statement
(definitely a little tricky).
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
[url]http://www.Bullschmidt.com[/url]
Classic ASP Design Tips, ASP Web Database Demo, ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest
-
Jamie Collins #4
Re: Inserting data from text file into database
Bullschmidt wrote ...
> > Is it possible to write a script in an ASP page that reads a comma
> > delimited text file and inserts the data row by row into an Access db?Both a .csv file and a Jet database can be queried using the MS OLE DB> You can connect to a csv file (which can be opened in Excel and which an
> Excel file can be converted into) in good form just as you can to a
> regular database.
>
> The .csv file needs to be uploaded to the server.
>
> And you can have two recordsets open at the same time.
>
> So I'd suggest going through this recordset one row at a time and within
> this loop add a new record to the "real" database's recordset.
Provider for Jet. Therefore, recordsets and looping should be
avoidable and instead use an INSERT INTO..SELECT query to update the
table in one hit e.g. while connected to the Jet DB:
INSERT INTO
MyJetTable
(MyCol1, MyCol2)
SELECT
MyCol1, MyCol2
FROM
[Text;Database=C:\MyFolder\;].[MyFile#csv]
;
Some fine tuning (column names, data types, etc) can be done on the
csv file using a schema.ini file:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/workingwithtextfiles.asp[/url]
Jamie.
--
Jamie Collins Guest



Reply With Quote

