Re: psqlODBC ODBC3.0/Column Names
От | Dave Page |
---|---|
Тема | Re: psqlODBC ODBC3.0/Column Names |
Дата | |
Msg-id | FED2B709E3270E4B903EB0175A49BCB1293307@dogbert.vale-housing.co.uk обсуждение исходный текст |
Ответ на | psqlODBC ODBC3.0/Column Names (Dave Page <dpage@vale-housing.co.uk>) |
Список | pgsql-odbc |
> -----Original Message----- > From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp] > Sent: 26 March 2002 21:20 > To: Dave Page > Cc: pgsql-odbc@postgresql.org > Subject: RE: [ODBC] psqlODBC ODBC3.0/Column Names > > > > I'm in the process of learning C#/.NET and whilst trying to > persuade > > an OdbcCommandBuilder to work as documented, thought I'd try the > > (development) > > ODBC3 version of the driver to see if that was the problem. > > > > I still haven't go the OdbcCommandBuilder to work, but I did find > > that with > > the v3 driver, the columns appear to have lost their names. > The following > > code returned the names as expected with the v2.5 driver, > but Column1, > > Column2... with the v3: > > Could you send me the MyLog output ? The attached archive, includes logs from the 2.5 & v3 drivers from my test program (also included so you can see what it's doing). These logs are also relevant to the other problem I reported (subject: .NET ODBC Data Provider). > > foreach(DataColumn dcDB in dsDB.Tables[0].Columns) > > Console.WriteLine("{0} ({1})", dcDB.ColumnName, > dcDB.DataType); > > > > I also found that the table name isn't returned for either > > driver, > > Probably you can see the table name if you check the *Parse > Statement* option. The *Parse Statement* is the only option > that could give us the table name or the base column name > (if the column has an alias). The other options(Premature > execution or Disallow Premature) couldn't give us the infos. Parse Statement doesn't do it. It may be a .NET thing though - maybe it only gets set if I open a table by name rather than using an SQL query which I don't think I can do with the ODBC provider (.NET has a common DataSet class which contains disconnected data from one or more tables in one or more data sources - the data is put there by a DataAdaptor, for which there are OleDB, Odbc & Sqlclient variants). Regards, Dave.
Вложения
В списке pgsql-odbc по дате отправления: