Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coOYF-00013P-AJ for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 06:06:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coOYE-0004pg-6U for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 06:06:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coOYD-0004pW-Nf for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 06:06:17 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coOY9-0005gy-KK for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 06:06:17 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id v2G667B22208 for ; Wed, 15 Mar 2017 23:06:07 -0700 Subject: Re: aspnet postgresql connection setting To: pgsql-bugs@postgresql.org References: <830123423A8BD849BC45E3ABD684B396498E7692@FTEX6.FT.FTG.COM> From: John R Pierce Message-ID: <5a96a64a-c355-3f64-5071-14f6f7418c31@hogranch.com> Date: Wed, 15 Mar 2017 23:06:02 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <830123423A8BD849BC45E3ABD684B396498E7692@FTEX6.FT.FTG.COM> Content-Type: multipart/alternative; boundary="------------02E6F922AEA13736CDD4245A" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------02E6F922AEA13736CDD4245A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 3/15/2017 10:18 PM, anderson.hsu@fengtay.com wrote: > Our website is produced by using aspnet + mssql, and then we would > like to move database from mssql to postgresql. But about the database > connection setting in web.config, we are not sure how to modify the > setting as listed as below: > value="Server='7a0642076\SQLEXPRESS';uid='sa';pwd='water';database='DB14017'"/> > value="Server=7a0642076\SQLEXPRESS;uid=sa;pwd=water;database=DB14017"/> > ..... that is all Microsoft SQL Server specific, somewhere else you must be connecting to the mssql ado driver. you need to install and use NPGSQL, which implements a .NET data provider for Postgresql. I don't program in that world, but here's home page for it... http://www.npgsql.org/doc/index.html -- john r pierce, recycling bits in santa cruz --------------02E6F922AEA13736CDD4245A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 3/15/2017 10:18 PM, anderson.hsu@fengtay.com wrote:
Our website is produced by using aspnet + mssql, and then we would like to move database from mssql to postgresql. But about the database connection setting in web.config, we are not sure how to modify the setting as listed as below:
<add key="CconString" value="Server='7a0642076\SQLEXPRESS';uid='sa';pwd='water';database='DB14017'"/>
         <add key="VBconString" value="Server=7a0642076\SQLEXPRESS;uid=sa;pwd=water;database=DB14017"/>
.....

that is all Microsoft SQL Server specific, somewhere else you must be connecting to the mssql ado driver.
you need to install and use NPGSQL, which implements a .NET data provider for Postgresql.     I don't program in that world, but here's home page for it...

http://www.npgsql.org/doc/index.html




-- 
john r pierce, recycling bits in santa cruz
--------------02E6F922AEA13736CDD4245A--