|
-
Jul 27th, 2006, 05:55 PM
#1
Thread Starter
New Member
connect to postgresql and get tables
I am trying to connect to postgresql from visual basic 6. I have both programs installed on my pc which means that the server is localhost. I have tried:
cn.Open "DSN=PostgreSQL;" & _
"UID=postgres;" & _
"PWD=***;" & _
"Database=mydb"
but it does not work. I gives me a runtime error: -2147467259 in vb6.
I have also tried this:
Const strPG As String = "Driver={PostgreSQL ANSI}; Server=localhost; PORT=5432; Database=mydb; UID=postgres; PWD=***"
but i don't know if it works, because I'm not able to get further, because I don't know how to define the records.
I have to mention that i have allready made a 400+ pages program which uses a lot of data from Access, so I'm quite familiar with those commands.
Any help would be much apprecialted!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|