Fwd: problem with using VBA connection string to postgresql

Поиск
Список
Период
Сортировка
От Łukasz Jarych
Тема Fwd: problem with using VBA connection string to postgresql
Дата
Msg-id CAGv31oddgJm01CrooAmCR5jPfthBPTU8VxyMCgyXdR=9kDuDBQ@mail.gmail.com
обсуждение исходный текст
Ответ на problem with using VBA connection string to postgresql  (Łukasz Jarych <jaryszek@gmail.com>)
Ответы Re: Fwd: problem with using VBA connection string to postgresql
Список pgsql-general
Maybe some security here? 

Best,
Jacek 


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

 

Вложения

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

Предыдущее
От: Łukasz Jarych
Дата:
Сообщение: problem with using VBA connection string to postgresql
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Fwd: problem with using VBA connection string to postgresql