From: | Łukasz Jarych <jaryszek(at)gmail(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org> |
Subject: | problem with using VBA connection string to postgresql |
Date: | 2018-06-27 12:25:57 |
Message-ID: | CAGv31of9=78R=JG0DA-y_o=0Ye+rvPn=u1Vxo6k_yDGfLwtE0Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Guys,
I am using code :
Sub copyingSchemas()
> Dim dbCon As Object
> Dim rst As Object
> Dim username, pass, strConnect As String
> username = Environ("username")
> pass = "PasswordAccess"
> Set dbCon = CreateObject("ADODB.Connection")
> Set rst = CreateObject("ADODB.Recordset")
> '''You can use a pass-through query to list the table names from your SQL
> Server database. Open a recordset based on that query. Then loop through
> the recordset rows and link each table.
> username = "postgres"
> pass = "1234"
> strConnect = "ODBC;DRIVER={PostgreSQL Unicode};" & _
> "DATABASE=AccessLog;" & _
> "SERVER=localhost;" & _
> "PORT=5432;" & _
> "UID=" & username & ";" & _
> "PWD=" & pass & ";" & _
> "Trusted_Connection=Yes;"
> dbCon.ConnectionString = strConnect
> dbCon.Open
> Dim strSQl As String
> strSQl = "SELECT * FROM t_cpuinfo();"
> rst.Open strSQl
> dbCon.Close
>
> End Sub
error is :
Linked Table connection string which is working :
Why?
Please help,
Best,
Jacek
From | Date | Subject | |
---|---|---|---|
Next Message | Łukasz Jarych | 2018-06-27 12:27:02 | Fwd: problem with using VBA connection string to postgresql |
Previous Message | Geoff Winkless | 2018-06-27 12:02:58 | Re: Code of Conduct committee: call for volunteers |