Oops, forgot that you also have to have a file called schema.ini in the same
folder as your text file.  This schema file will define your fields and data
types.  Google schema.ini and you'll find out how to use it.

If your data/text file doesn't always have the same name, you can change the
file name to something consistent for using the schema.ini, or build a
schema.ini with code to match your filename.


----- Original Message ----- 
From: "Chris Hagwood" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 23, 2004 6:40 AM
Subject: Re: [ASP] import a csv file into ms access using asp.

>
>  TXT_CONNECTIONSTRING = "Driver={Microsoft Text Driver (*.txt; *.csv)};" &
_
>   "Dbq=" & ServerPath & ";" & _
>   "Extensions=asc,csv,tab,txt;" & _
>   "Persist Security Info=False"
>
>  Set Conn = CreateObject("ADODB.Connection")
>   Conn.Open TXT_CONNECTIONSTRING
>
>   ' OPEN TEXT FILE AS A DB
>   sql = "SELECT * from EVENTS.TXT;"
>   set rs = conn.execute(sql)
>
> 'Insert code to opend Access db and insert records here
>




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to