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RhcHRpdmUgU2VydmVyIElRIiBP
REJDIGRyaXZlci4NCg0KSXMgdGhlcmUgdGhlIHBvc2liaWxpdHkgdG8ganVz
dCBzdG9yZSB0aGUgRFNOIGFzIGNvbm5ldGlvbiBTdHJpbmc/DQpPciBtYXli
ZSBpcyBpdCBzb21laG93IHBvc3NpYmxlIHRvIHVzZSB3aW5kb3dzIGF1dGhl
bnRpZmljYXRpb24gZm9yIHRoZSBvZGJjLWNvbm5lY3Q/DQoNClRoYW5rcw0K
DQpTdGVwaGFuIA0KCi0tIApTZW50IHZpYSBwZ3NxbC1vZGJjIG1haWxpbmcg
bGlzdCAocGdzcWwtb2RiY0Bwb3N0Z3Jlc3FsLm9yZykKVG8gbWFrZSBjaGFu
Z2VzIHRvIHlvdXIgc3Vic2NyaXB0aW9uOgpodHRwOi8vd3d3LnBvc3RncmVz
cWwub3JnL21haWxwcmVmL3Bnc3FsLW9kYmMK

Re: Postgres ODBC Changes DSN

am 14.04.2010 19:23:32 von Hiroshi Saito

Hi.

Is this exsample helpful to you?

example)
Public Sub ADObase()
Dim ADOcon As ADODB.Connection
Dim rec As ADODB.Recordset
Dim svp As ADODB.Command
Set ADOcon = New ADODB.Connection
Set rec = New ADODB.Recordset
Set svp = New ADODB.Command

ADOcon.Open "Provider=MSDASQL.1;DRIVER=PostgreSQL
Unicode;DATABASE=postgres;SERVER=localhost;PORT=5432;UID=pos tgres;A6=;A7=100;A8=8192;B0=254;B1=8190;BI=0;C2=dd_;CX=1b517 a9;"
rec.Open "select * from pg_user", ADOcon
rec.Movefirst
svp.ActiveConnection = ADOcon
i = 1
Do Until rec.EOF = True
Cells(i, 1) = rec.Fields(0).Value
Cells(i, 2) = rec.Fields(1).Value
i = i + 1
rec.MoveNext
Loop
Set ADOcon = Nothing
End Sub
=========================

Regards,
Hiroshi Saito

----- Original Message -----
From: "Stephan Martin"


>
> Hello there,
>
> I work for the BI/Reporting at the Customer Care Department at 1&1.
>
> I would like to send an Excel-Report to the different managers
> and heads of the departments.
>
> My Customers should have a DSN with the same name as stored in the sheet, but with their
> own Single Sign On username and password in it.
>
> When they update the Excelsheet, the data they get is filtered according to their username
> so everyone gets just the data they need when they need it.
>
> Everything is working fine, exept of the ODBC-Driver of Postgres:
> When I enter the Connection String "DSN=pre_ods_dev" all parameters get added to The
> Connection String including the UID.
>
> DSN=pre_ods_dev;DATABASE=pre_ods_dev;SERVER=opsbimw.schlund. de;PORT=5432;UID=opsreporting;;SSLmode=require;ReadOnly=0;Pr otocol=7.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;Sh owSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;Unknown Sizes=0;MaxVarcharSize=255;MaxLongVarcharSize=8190;Debug=0;C ommLog=0;Optimizer=0;Ksqo=1;UseDeclareFetch=0;TextAsLongVarc har=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAs FreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;Updatabl eCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLo ngVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;X aOpt=1
>
> Even if I delete them, I am not able to store the Connection String without all the data.
>
> When they open the file and update the data, the get an error that they use the wrong
> username.
>
> This doesn't happen with "Sybase Adaptive Server IQ" ODBC driver.
>
> Is there the posibility to just store the DSN as connetion String?
> Or maybe is it somehow possible to use windows authentification for the odbc-connect?
>
> Thanks
>
> Stephan
>
> --
> Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-odbc
>


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc