Hello my dear friends...
I swallow one more collaboration to help those that as I want to use the VISUAL BASIC integrated with PostGresQL.
Once again I want to thank to all of this FORUM that directly or indirectly they help me with you doubt them that I have correspondent.
1 - To do a simple SELECT with PARAMETER in the DATABASE returning all of the ROWS and COLUMNS of the table USER, make the following:
In POSTGRESQL 8:
CREATE OR REPLACE FUNCTION sp_user_search(int2)
RETURNS SETOF user AS $BODY$
SELECT * FROM user WHERE iduser = $1;
In VISUAL BASIC 6 using ADO 2.8:
Dim adoBD As ADODB.Connection
Dim rsTB As New ADODB.Recordset
Set adoBD = New ADODB.Connection
adoBD.ConnectionString = "driver=PostgreSQL};server=localhost;database=SICCEV;port=5432;uid=ryan;pwd=displace;"
Set rsTB = adoBD.Execute("select * from sp_user_search('1');")
Do While Not rsTB.EOF
MsgBox tb!iduser & " - " & tb!user & " - " & tb!password & " - " & tb!fullname
RESULT OF EXECUTION: 1 - Sandro - 123 - Sandro Yaqub Yusuf
Coming soon: making INSERT in the DATABASE...
pgsql-odbc by date
|Next:||From: Mike Fahey||Date: 2004-10-07 15:07:32|
|Subject: update rules + views + odbc problems|
|Previous:||From: anthony.caduto||Date: 2004-10-06 16:22:23|
|Subject: Schema support problems with latest snapshot|