locked
Accessing the Remote system ODBC:DSN in C# RRS feed

  • Question

  • Hi ,

    I like to know how access the remote system ODBC-DSN database through .net OdbcConnection object.

     

    Thanks

    LokeshRaj

    • Moved by edhickey Tuesday, September 6, 2011 4:41 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Monday, September 5, 2011 5:05 AM

Answers

  • Under Classic ADO you could use RDS or the MS Remote provider, but these technologies are not supported under ADO.NET. I would use the DSN-less connection instead.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by LokeshRaj Monday, September 12, 2011 11:47 AM
    Friday, September 9, 2011 12:47 PM
  • That would be correct. The only other way I can think of to actually use a remote DSN would be through a Web Service or COM+ component running on the remote machine. In both instances the remote component would handle your data access.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by LokeshRaj Monday, September 12, 2011 11:47 AM
    Friday, September 9, 2011 1:48 PM

All replies

  • Hello,

    What's your database?

    Regarding your question, I suggest you can check this codeproject for more detailed information for different database.

    http://www.codeproject.com/KB/database/connectionstrings.aspx

    http://www.connectionstrings.com/

    http://msdn.microsoft.com/en-us/library/system.data.odbc(v=VS.90).aspx

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 7, 2011 5:27 AM
  • Hi

    thanks for your reply.

    I am using postgresql. 

    I can able to connecte to remote system database through ODBC DSN less connection.

    I like to know is there any way to connect to the already existing System DSN in the remote machine.

    Wednesday, September 7, 2011 5:37 AM
  • Thanks for your clarification.

    I'm not familiar to PostgreSQL, but Npgsql's ADO.NET Provider for PostgreSQL. I suggest you can open a new thread here for more helpful suggestions. http://pgfoundry.org/forum/?group_id=1000140

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 7, 2011 6:15 AM
  • Under Classic ADO you could use RDS or the MS Remote provider, but these technologies are not supported under ADO.NET. I would use the DSN-less connection instead.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by LokeshRaj Monday, September 12, 2011 11:47 AM
    Friday, September 9, 2011 12:47 PM
  • Paul,

     

    Thanks for your reply.

    From your reply, what i have interpreted is, "there is no way  to access the remote system ODBC-DSN database through ADO.net OdbcConnection object and we have to use DSN-less connection object".

     

    Am i corret?

     

    Thanks

    LokeshRaj

    Friday, September 9, 2011 12:54 PM
  • That would be correct. The only other way I can think of to actually use a remote DSN would be through a Web Service or COM+ component running on the remote machine. In both instances the remote component would handle your data access.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by LokeshRaj Monday, September 12, 2011 11:47 AM
    Friday, September 9, 2011 1:48 PM