In theory, if you are already using a .NET data provider, then you simply 
change the data source.  In practice, you might have to make a few small 
changes.

That is the entire beauty of using OLEDB, ODBC, .NET providers, etc.  Since you 
are coding to an industry standard, every data access tool that conforms to the 
standard should work without modification.

Now, if you are sending a SQL string that says "SP_WHO" PostgreSQL is not going 
to give you a list of attached users because that command is Microsoft 
SQL*Server specific.  But if you have a table with the identical data 
structure, then "SELECT ssn FROM employees WHERE bonus_conditions_met = 1" 
should work the same no matter what the data source is.

If you are using a database specific data interface (for instance, if you are 
connecting via DB-Library) then you will have to do some recoding, because 
DB-Library is specific to SQL*Server and Sybase.

If you have an ODBC connection to a database in your code, and all your calls 
are ODBC calls, and if the application is written properly, then changing the 
database should be as simple as setting up a new data source.   Same for OLEDB. 
 Same for JDBC.  Same for .NET providers.  This is the entire and fundamental 
reason for using these tools.   Otherwise, we would all be using custom 
database API libraries instead.

From: mike stanton [mailto:mike.stan...@autocastillo.cl]
Sent: Friday, November 05, 2010 2:47 PM
To: Dann Corbit
Subject: Re: [GENERAL] Access postgresql data base from .net

Dann, perhaps the a better question would be.....if we use, for example, 
npgsql, we'd have to adapt code and use the tools own calls. And that means 
rewriting. Is this true?.

Cheers
Mike
----- Original Message -----
From: Dann Corbit<mailto:dcor...@connx.com>
To: 'mike stanton'<mailto:mike.stan...@autocastillo.cl> ; 
pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>
Cc: mike stanton<mailto:mstan...@acsa.cl>
Sent: Friday, November 05, 2010 5:12 PM
Subject: Re: [GENERAL] Access postgresql data base from .net

From: 
pgsql-general-ow...@postgresql.org<mailto:pgsql-general-ow...@postgresql.org> 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton
Sent: Friday, November 05, 2010 12:08 PM
To: pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>
Cc: mike stanton
Subject: [GENERAL] Access postgresql data base from .net

Hello all; we´ve got a project where we have a system built originally for 
.net/sql-server. Now we want to change sql-server for a postgresql database. 
And preferably without using the ODBC driver which we have heard is prone to 
errors.
>>
What specific errors did you hear about?
I suggest testing the rumors.  If there really is some problem, then submit a 
bug report.
Sometimes, people want you to use their tools, and so they will exaggerate the 
problem with competitive tools.
<<

Is there a producto which we can use which does not imply a major rewrite of 
all the SQL ?.
>>
Probably most interface tools will work if you are using ISO standard SQL.  Any 
place where you are using SQL language extensions you will have to do some work.
You can find interfaces here:
http://pgfoundry.org/softwaremap/trove_list.php?form_cat=310

There are also a very large number of commercial interfaces for PostgreSQL 
available. You can find out about those here:
http://www.sqlsummit.com/DataAcce.htm
<<

Obviously we may have problemas with differences between Sql-server and 
Postgresql syntax, but we don´t want to de a rewrite.
>>
What specific problems are you having?
<<

Hope to hear soon, any help appreciated.

Mike Stanton W.
Santiago Chile


__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com


__________ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __________

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com

Reply via email to