Senin, 26 September 2011

Re: [MS_AccessPros] Link to .csv file... but only for a second (DAO)

 

Heh, I dunno why I make things so complicated... A temp table + import spec = done! Thanks John!

--- In MS_Access_Professionals@yahoogroups.com, "John Viescas" <john@...> wrote:
>
> Lee-
>
> Why not import the file? DoCmd.TransferText should do that with no muss nor
> fuss. You can use DAO to delete the imported table after you're done with it.
>
> John Viescas, author
> Microsoft Office Access 2010 Inside Out
> Microsoft Office Access 2007 Inside Out
> Building Microsoft Access Applications
> Microsoft Office Access 2003 Inside Out
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
>
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Lee
> Sent: Monday, September 26, 2011 6:34 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Link to .csv file... but only for a second (DAO)
>
> Hi,
> I have a .csv file I want to link to, but I don't want the link to persist. The
> reason is because there is a scheduled job on the network that updates the .csv
> file and if the file is open, the job fails and I get a call from MIS yelling at
> me.
>
> I just want to quickly link to the .csv file, run a quick query against it, then
> get rid of the link. I was messing around with DAO but I can't figure out how
> to create a NEW link (although I can refresh existing links), and I'm not sure
> if I put import specs in the connection string or not. I don't really have
> anything to show in terms of code because I'm totally stuck. I can't find the
> dao.tabledef property to create a new connection, or should I be using tabledefs
> append method somehow?
>
> Thanks
> -Lee
>
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar