Postgres ODBC Changes DSN
Postgres ODBC Changes DSN
От:
"Stephan Martin" <Stephan.Martin@1und1.de>
Дата:
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;Protocol=7.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=255;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=0;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;XaOpt=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
Re: Postgres ODBC Changes DSN
От:
"Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>
Дата:
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=postgres;A6=;A7=100;A8=8192;B0=254;B1=8190;BI=0;C2=dd_;CX=1b517a9;" 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;Protocol=7.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=255;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=0;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0;LowerCaseIdentifier=0;XaOpt=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 >