Обсуждение: OLEDB connection does not want to work. Help!!

Поиск
Список
Период
Сортировка

OLEDB connection does not want to work. Help!!

От
tommaso.gastaldi@uniroma1.it
Дата:
Hi all, I am pulling my hair trying to make work an OLEDB
connection to POSTGRES.

Let me anticipate that, except for the connection string
I am using the same code (VB.NET, Oledb) that has already
proved to work fine with all the following systems:

sqlserver, Mysql, db2, access, Oracle
[to say although I know nothing about Postgres, in general I should
know how to deal with OleDb]

This one is the only one DBMS is giving me headache.
Could you please help me out to spot the problem?

I work now on XP, with VB.NET. I get connected. But, after that,
nothing seems to work.

my connection string looks like:

  Me.ConnectionString = "Provider=PostgreSQL.1;Data
Source=MYDATABASE;User ID=postgres;Location=MioDb;Password='mypsw'"


Just at the very first and fundamental instruction:

OleDbConnection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Provider_Types,
New Object() {Nothing, Nothing})

or any other one like:

OleDbConnection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables,
New Object() {Nothing, Nothing, Nothing, Nothing})

I get an error. My error is:

PostgreSQL.1 failed with no error message available, result code:
E_OUTOFMEMORY(0x8007000E)


(Needless to say I have no memory problem my ram and my disk have
several Gigs free)


What do I have to do (before suicidal)?

-tom


Re: OLEDB connection does not want to work. Help!!

От
"Merlin Moncure"
Дата:
On 4 Jul 2006 07:31:04 -0700, tommaso.gastaldi@uniroma1.it
> sqlserver, Mysql, db2, access, Oracle
> [to say although I know nothing about Postgres, in general I should
> know how to deal with OleDb]
>
> This one is the only one DBMS is giving me headache.
> Could you please help me out to spot the problem?
>
> I work now on XP, with VB.NET. I get connected. But, after that,
> nothing seems to work.

Use native .net driver, npgsql, or oledb wrapper for odbc and the odbc
driver.  I never got the ole db driver to work either.

Merlin

Re: OLEDB connection does not want to work. Help!!

От
tommaso.gastaldi@uniroma1.it
Дата:
Hi Merlin, thanks!

Yesterday I had the big honor to talk (by email) with Shachar and it
seems that they (someday) will fix this fundamental issue.

I tried to stress how important is to support the OleDbSchemaGuid info,
as the main reason one wants to use this driver, like me, is because he
is doing something that is independent of the underlying DBMS.

From my perpective an OleDb provider which has no support for that
staff, is * totally  useless *. That's also the reason why npgsql,
which I have explored, is not fit for my purposes.

In general when you have an application that needs to speak to all
possible DBMS (and there are many, such as Reporting Tools or Query
builders, ...), and hence rely strictly on the OleDb information, the
OleDb is the only way to go (I believe).

That's one of the reason of the popularity OleDb providers are gaining
among programmers.

Clearly DB producer tend to try to push towards proprietary solutions
(see SQLconnections, OracleConnections, ...) but they will not succeed.
General and common sense solution have always won. It's only matter of
time.

It is important that the Postgres people realize that a good OleDb
provided is crucial to spread their product. Just as an example I am
just waiting for their fix to provide support to Postgres users in one
project of mine:

http://cam70.sta.uniroma1.it/Community/

and this will certainly contribute to increase (a little) the
popularity of Postgress. (But I cannot do anything to help them if they
don't fix it.)

And I guess there are hundred project like this going on...

-Tom


"Merlin Moncure" ha scritto:

> On 4 Jul 2006 07:31:04 -0700, tommaso.gastaldi@uniroma1.it
> > sqlserver, Mysql, db2, access, Oracle
> > [to say although I know nothing about Postgres, in general I should
> > know how to deal with OleDb]
> >
> > This one is the only one DBMS is giving me headache.
> > Could you please help me out to spot the problem?
> >
> > I work now on XP, with VB.NET. I get connected. But, after that,
> > nothing seems to work.
>
> Use native .net driver, npgsql, or oledb wrapper for odbc and the odbc
> driver.  I never got the ole db driver to work either.
>
> Merlin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend


Re: OLEDB connection does not want to work. Help!!

От
"Merlin Moncure"
Дата:
On 5 Jul 2006 06:33:34 -0700, tommaso.gastaldi@uniroma1.it
<tommaso.gastaldi@uniroma1.it> wrote:

> Yesterday I had the big honor to talk (by email) with Shachar and it
> seems that they (someday) will fix this fundamental issue.
>
> I tried to stress how important is to support the OleDbSchemaGuid info,
> as the main reason one wants to use this driver, like me, is because he
> is doing something that is independent of the underlying DBMS.



> >From my perpective an OleDb provider which has no support for that
> staff, is * totally  useless *. That's also the reason why npgsql,
> which I have explored, is not fit for my purposes.

in my opinion the support for the npgsql driver is ok (not great).  It
is much better than the oledb provider however.

> In general when you have an application that needs to speak to all
> possible DBMS (and there are many, such as Reporting Tools or Query
> builders, ...), and hence rely strictly on the OleDb information, the
> OleDb is the only way to go (I believe).

I have used basically every version of visual studio and have found
that in most cases for most uses, you will be best off with the oledb
provider for odbc drivers if you want to use such tools.  Second
choice (.net only) is to use npgsql driver and typed datasets.

> That's one of the reason of the popularity OleDb providers are gaining
> among programmers.

ODBC is much more important standard than oledb.

> Clearly DB producer tend to try to push towards proprietary solutions
> (see SQLconnections, OracleConnections, ...) but they will not succeed.
> General and common sense solution have always won. It's only matter of
> time.

True, but oledb is basically microsoft only protocol while odbc is
essentially open standard.  Personally, I don't mind using specific
providers.  For example, at least 50% of my development is directly
over libpq library.

> It is important that the Postgres people realize that a good OleDb
> provided is crucial to spread their product. Just as an example I am
> just waiting for their fix to provide support to Postgres users in one
> project of mine:
>
> http://cam70.sta.uniroma1.it/Community/
>
> and this will certainly contribute to increase (a little) the
> popularity of Postgress. (But I cannot do anything to help them if they
> don't fix it.)

Most .net development with pg is done with the npgsql driver.  Most
vb6 development is done via odbc programming AFAIK.  Vast majority of
postgesql development however is done with C, Java, Perl, php, etc so
that's understdably where the focus is.

merlin

Re: OLEDB connection does not want to work. Help!!

От
tommaso.gastaldi@uniroma1.it
Дата:
Hi Merlin, as I tried to explain, I do not need just to send some sql
to postgres, I am working at an higher level of abstraction, where I
need the information (that must be) provided by (any) OleDb Provider

> in my opinion the support for the npgsql driver is ok (not great).  It
> is much better than the oledb provider however.

No doubt about that, but this is irrelevant for my purposes.

> > In general when you have an application that needs to speak to all
> > possible DBMS (and there are many, such as Reporting Tools or Query
> > builders, ...), and hence rely strictly on the OleDb information, the
> > OleDb is the only way to go (I believe).
>
> I have used basically every version of visual studio and have found
> that in most cases for most uses, you will be best off with the oledb
> provider for odbc drivers if you want to use such tools.  Second
> choice (.net only) is to use npgsql driver and typed datasets.

I am NOT talking of "the oledb provider for odbc drivers": I never used
it either.

> > That's one of the reason of the popularity OleDb providers are gaining
> > among programmers.
>
> ODBC is much more important standard than oledb.

Here we have different opinions. I could show you a lot of things you
cannot
do without the OleDb functionalities, at least if you want to talk to
all
dbms at the same time.

> True, but oledb is basically microsoft only protocol while odbc is
> essentially open standard.  Personally, I don't mind using specific
> providers.  For example, at least 50% of my development is directly
> over libpq library.

Nowadays every producer must have its OleDb provider. It's not an
option.
Moreless, like for me it not an option to write a program that does not
use
web services or isn't web enabled. Of course I could disregard that
part.
But that I would lose about 90% of my potential users (or clients).

>
> > It is important that the Postgres people realize that a good OleDb
> > provided is crucial to spread their product. Just as an example I am
> > just waiting for their fix to provide support to Postgres users in one
> > project of mine:
> >
> > http://cam70.sta.uniroma1.it/Community/
> >
> > and this will certainly contribute to increase (a little) the
> > popularity of Postgress. (But I cannot do anything to help them if they
> > don't fix it.)
>

You know, Merlin, sometimes people perpective are just different
because they
come from different experiences and environment. It's not matter to be
right or wrong.
In my experience, it is crucial the possibility to rely on the high
level information
provided by the OleDb protocol, because it allows to have a unique
interface for
any dbms in the world and to have a unique way to do things (apart the
slight differences
in sql dialects). This allows easy system integration. If you see for
intance how
DataTime works, retrieving dbms structure talking with any dbms and
easily moving data from one to another, it will be clear what I mean.
If I should write code that depends on the underlying DBMS, maintenance
would just be impossibile and programming a real hell (it's already a
hell the way it is now :) ! ) General standards have always prevailed.
It's just matter of time.

un caro saluto,

Tommaso


Re: OLEDB connection does not want to work. Help!!

От
tommaso.gastaldi@uniroma1.it
Дата:
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

Is this for me? I am currently using Google to post.