Search Postgresql Archives

Re: Make MS Access "UPDATE" PostGre SQL Table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pettis, Barry wrote:

However, I am now in need of being able to update a PostGre table.  The
source will be a .csv file.

        I've seen a "COPY" command in PostGre that will allow you to
specify a .csv file as the source, but in looking at it it appears that

        I'm using Access as that is a point of comfort for me.  I can
write a .net procedure though I'm not exactly firm on the procedure.


Thoughts on how to do the entire front end in Access.


From Access I would think you can use the standard Access import commands to import the file just as you would into an Access/SQLServer based table. (I haven't used Access much so don't quote me there) But then if that worked you probably wouldn't be asking here.

The other option I would think of is using a script that would copy the file to the server and then run the COPY FROM... command (the file will need to be accessible to the server if your are sending it the command as SQL to execute)


The way I would go, is having psql on the client side run it's version of the copy command. (though you may need to install psql on client machines along with the Access runtime)

On *nix you would do something like -
echo "\copy mytable from mylocaldata.csv" | psql

I'm sure you could do a vb script to do that for you if you wanted to stay in Access.



--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux