SQL and .NET connectivity problem

Hi guys,

I am making ma project of Hospital managent system using C# as well as .NET in frontend and SQL server 2005 at backend.
The problem is when I made my connection from the .NET to SQL for accessing particular database on my personal pc that connection is not working in other pc, means I am not able to retrive particular data from DATASET.

I am using ADO.Net for connectivity.(I edit ma connection string and change server name but problem is still there) ๐Ÿ˜•

Replies

  • CEMember
    CEMember
    Hi Heart-hacker ๐Ÿ˜€


    Are you sure that connection is working when not used in .NET framework. I mean tables and connections are already created and working correctly in SQL Server ? Did you create OleDBConnection object in code. ?

    Is it possible for you share the code[atleast ConnectionString part] here so that we can get an idea to detect the error in it.
  • HEART-HACKER
    HEART-HACKER
    CEMember
    Hi Heart-hacker ๐Ÿ˜€


    Are you sure that connection is working when not used in .NET framework. I mean tables and connections are already created and working correctly in SQL Server ? Did you create OleDBConnection object in code. ?

    Is it possible for you share the code[atleast ConnectionString part] here so that we can get an idea to detect the error in it.

    Thanks for quick reply....

    Yes its working properly in SQL server... I can use all DDL and DML statements perfectly
  • HEART-HACKER
    HEART-HACKER
    Here it is my CONNECTION STRING >>>>> Data Source=ACD-2C0EEE85F9C;Initial Catalog=LIFELINE_HMS;Integrated Security=True


    Dude I am using ADO.NET for connection not OLEDB
  • CEMember
    CEMember
    HEART-HACKER
    Yes its working properly in SQL server... I can use all DDL and DML statements perfectly
    That's cool ๐Ÿ˜€

    HEART-HACKER
    Here it is my CONNECTION STRING >>>>> Data Source=ACD-2C0EEE85F9C;Initial Catalog=LIFELINE_HMS;Integrated Security=True


    Dude I am using ADO.NET for connection not OLEDB
    Sorry for that as I have lost touch of all these things but as no CEan yet replied to your query so just made an attempt to help you out. Anyways, are you sure, you have set the correct values in your Connection String ?

    I guess if database is created in your system only then Data Source = (local). What is this "ACD-2C0EEE85F9C" ?
    LIFE_LINE_HMS
    is your Database's name right? Well, no user names and passwords for your database right?

    Check your data source once again. Also can check following link for more information, if can be of any help to you.
    #-Link-Snipped-#

    All the Best ! ๐Ÿ˜€
  • HEART-HACKER
    HEART-HACKER
    CEMember
    That's cool ๐Ÿ˜€



    Sorry for that as I have lost touch of all these things but as no CEan yet replied to your query so just made an attempt to help you out. Anyways, are you sure, you have set the correct values in your Connection String ?

    I guess if database is created in your system only then Data Source = (local). What is this "ACD-2C0EEE85F9C" ?
    LIFE_LINE_HMS is your Database's name right? Well, no user names and passwords for your database right?

    Check your data source once again. Also can check following link for more information, if can be of any help to you.
    #-Link-Snipped-#

    All the Best ! ๐Ÿ˜€

    Data Source = (local) means Our LOCAL SERVER means your PC NAME.

    "ACD-2C0EEE85F9C" is my LOCAL SERVER NAME
  • HEART-HACKER
    HEART-HACKER
    Thanks for the link......
  • easels
    easels
    HEART-HACKER
    Hi guys,

    I am making ma project of Hospital managent system using C# as well as .NET in frontend and SQL server 2005 at backend.
    The problem is when I made my connection from the .NET to SQL for accessing particular database on my personal pc that connection is not working in other pc, means I am not able to retrive particular data from DATASET.

    I am using ADO.Net for connectivity.(I edit ma connection string and change server name but problem is still there) ๐Ÿ˜•
    hey buddy the database problem is not new . i personnally have not tried running the exe application in other computer and it runs well.you can try is copy the database in debug folder of the project and put the connection string as application.startpath which is were the exe is kept
    if it does not corrects then post it i will try another way
  • easels
    easels
    hey buddy the database problem is not new . i personnally have not tried running the exe application in other computer and it runs well.you can try is copy the database in debug folder of the project and put the connection string as application.startpath which is were the exe is kept
    if it does not corrects then post it i will try another way
  • debu
    debu
    @HEART-HACKER: I agree with easels, try copying your db's *.mdf file in the /bin/debug or /bin/release (whichever you are using) directory. I seem to recall having the same problem in the past, but I can't seem to recall what the cause of the problem was, or how I fixed it ๐Ÿ˜’.

    I'll keep you updated if something strikes me.

    Regards,

    Debu ๐Ÿ˜€
  • HEART-HACKER
    HEART-HACKER
    easels
    hey buddy the database problem is not new . i personnally have not tried running the exe application in other computer and it runs well.you can try is copy the database in debug folder of the project and put the connection string as application.startpath which is were the exe is kept
    if it does not corrects then post it i will try another way
    I am not getting you.... ๐Ÿ˜•

You are reading an archived discussion.

Related Posts

Guys, Post your presentation topics for IT/CS in this thread. ๐Ÿ˜ We want awesome, completely new topics!
Dear friends, Please do share the event details of techfests organized by your college. ๐Ÿ˜€ . CE's one of the better platforms around to spread the word about your college...
how to assign serial number to report using any query or function in access???
Hello CE's, This is about my summer term project. I want to worked on RTOS based project. but i am confused...๐Ÿ˜• I require the following information: 1. where can i...
Hi, myself an M.Tech in CS and interested to pursue PhD. I am looking thesis titles in networking. Please help me in this regard. suggest good websites also. thanks in...