Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 14th, 2004, 2:44 PM   #1
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Hey,

i need to connect a vb application to a postgresql server on our network/over the internet. What references...etc do i need to include in the project. Also and example of how to connect would be great...thanks in advance.

-Pizentios
Pizentios is offline   Reply With Quote
Old May 14th, 2004, 3:32 PM   #2
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
Option Explicit
Const sqlstatement = "Select * From dbname"

Private Sub dbconnect()
 * *
 * *Dim strConnect1 As String
 * *strConnect1 = "ODBC;DSN=PostgreSQL;UID=postgres;PWD=password"
 * *dbname.Options = dbSQLPassThrough
 * *dbname.Connect = strConnect1
 * *dbname.RecordsetType = vbRSTypeDynaset
 * *dbname.RecordSource = sqlstatement
 * *dbname.Refresh
End Sub

this is what i use to connect to postgresql at work. i use vb5 but im sure it will work for vb6. not that much changed from 5 to 6.
you will need to have the postgresql odbc drivers on the system that you are trying to connect from and that should be all you have to do. if you need more help with this jst ask and i will be glad to help

p.s. welcome to the forums
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old May 14th, 2004, 5:36 PM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Thanks for the welcome. Hopfully i can help make this place grow. Anyways, where would i find the "ODBC Drivers"?? I am new to ODBC, because i am usally developing for all linux or all windows clients...thus i can have in the past choosen different methods in the past for developing. But now the tables have turned. This vb app that i have developed in the past, works great but the user base want's to have the same data all the time...and since i just finished setting up my "new" and "improved" postgresql server a few weeks ago, i thought that it might be a good learning experence for me to use it. I have used postgres lots but mostly all through php. Eventually the app will be move to web based, but for a quick fix, i'd like to implement it this way for a month or so, to releave the deadline lomming over my head. Thanks for all your help so far.

-Pizentios
Pizentios is offline   Reply With Quote
Old May 14th, 2004, 6:56 PM   #4
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
ftp://ftp3.us.postgresql.org/pub/postgres.../versions/full/
i would recommend using the newest one. and its not to bad working with vb and postgresql i do it at work quite often. its pretty easy but hope this helps and i hope this places grows too. we could have a great thing goin here if i had more money for advertising and good luck with the vb and postgresql
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old May 17th, 2004, 4:54 PM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
thanks for the link. I ended up getting it to work perfectly. Thanks for your help.


-Pizentios
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old May 17th, 2004, 5:01 PM   #6
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
no problem if you have any more problems dont forget to come back
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC