Software development query?
-
Hi, I am Developing a software project in c#.net and using postgresql as database.i am fairly new to the postgres db and I am trying to connect to the DB thru c#.net code (i m using VS 2005 as IDE). I have tried all the 3 DB drivers (OLEDB,ODBC,Npgsql) but i am getting different error for each. 1) OLEDB database : i created a datasource and i do test connection it is successful but when i say OK it gives me error as Multiple OLEDB Operation generated errors Check each OLE DB status value, if available. No work was done. I tried connecting thru code but a different error was thrown as Error: System.Data.OleDb.OleDbException: FATAL: invalid command-line arguments for server process HINT: Try "postgres --help" etc. 2) ODBC driver : when i try to connect thru datasource using IDE the test connection is succedded and i can see the correct DB as well as tables etc.But i connect thru c# code it gives error ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified. The connection string used for OLEDB is :- string str = "Provider=PostgreSQL.1;" + "Addr=127.0.0.1;" + "Database=postgres;" + "User ID=postgres;" + "Password=vinaya"; 2) Connection string for ODBC used is :- string str = "DSN = PostgreSQL35W;Server=localhost;Port=5432... Id=postgres;Password=vinaya;Database=pos... Please guide what shud i do ?? i am not able to proceed further
-
Answer:
Make sure that you have all of the applicable drivers and framework installed. If you are using VS2005 and are trying to connect to SQL Server 2008, the drivers may not be installed. Also, try to open up the database in a SQL Editor first before you try your connection. You may find that your connection string is completely wrong.
Yahoo! Answers Visit the source
Other answers
Make sure that you have all of the applicable drivers and framework installed. If you are using VS2005 and are trying to connect to SQL Server 2008, the drivers may not be installed. Also, try to open up the database in a SQL Editor first before you try your connection. You may find that your connection string is completely wrong.
Johnny
Related Q & A:
- How to convert sql query to Hibernate Criteria query?Best solution by Stack Overflow
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- How to convert SQL query to LINQ query?Best solution by Stack Overflow
- How do I get a job in IT or Software Development if I have no experience and only a 3rd class degree?Best solution by answers.yahoo.com
- Is cognitive development the same as intellectual development?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.