Re: postgresql and VB

Поиск
Список
Период
Сортировка
От Masse Jacques
Тема Re: postgresql and VB
Дата
Msg-id 0B87317EA62BD211A02A00A0C9DFB7EC9B5ED4@hermes.bordeaux.cemagref.fr
обсуждение исходный текст
Ответ на postgresql and VB  (Mourad Dhambri <mourad_dhambri@yahoo.fr>)
Список pgsql-general
It does within Access 2000 and DAO lib. Create a pass-through query (direct
query to pg) and passing a parameter "id" to the pg_function
-----------------------------------------
Function my_func(id As String)

    Dim wrkODBC As DAO.Workspace
    Dim qdfTemp As DAO.QueryDef
    Dim connexion As DAO.Connection
    Dim rstTemp As DAO.Recordset
    Dim qdfString As String

    Set wrkODBC = CreateWorkspace("ODBCWorkspace", "admin", "", dbUseODBC)
    Workspaces.Append wrkODBC
    Set connexion = wrkODBC.OpenConnection("Connection1", dbDriverNoPrompt,
,
"ODBC;DSN=mydbase;DATABASE=mydbase;SERVER=myserver;PORT=5432;UID=user;PWD=pa
ssword")
    Set qdfTemp = connexion.CreateQueryDef("")
    qdfString = "SELECT(my_pg_function(" & id & "))"
    Debug.Print "Query results for " & qdfString
    Set rstTemp = connexion.OpenRecordset(qdfString, dbOpenDynamic)
    With rstTemp
        Do While Not .EOF
            Debug.Print , !f_desc
            .MoveNext
        Loop
        .Close
    End With
    connexion.Close
    wrkODBC.Close

End Function
--------------------------------------------
___________________________________________
Jacques Massé
Tel. 33 (0)5 57 89 08 11 - Fax 33 (0)5 57 89 08 01


-----Message d'origine-----
De : Mourad Dhambri [mailto:mourad_dhambri@yahoo.fr]
Envoyé : vendredi 6 septembre 2002 08:53
À : pgsql-general@postgresql.org
Objet : [GENERAL] postgresql and VB


Hi,
I would like to know how I could call a postgresql
function from VB.
Thanks.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Date not being parsed as expected
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Date not being parsed as expected