SQL and .NET connectivity problem

HEART-HACKER

HEART-HACKER

@heart-hacker-nZz25T β€’ Oct 18, 2024

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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • CEMember

    CEMember

    @cemember-PlqlWH Jul 6, 2009

    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

    @heart-hacker-nZz25T Jul 6, 2009

    CEMemberHi 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

    @heart-hacker-nZz25T Jul 6, 2009

    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

    @cemember-PlqlWH Jul 7, 2009

    HEART-HACKERYes its working properly in SQL server... I can use all DDL and DML statements perfectly

    That's cool πŸ˜€

    HEART-HACKERHere 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

    @heart-hacker-nZz25T Jul 8, 2009

    CEMemberThat'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

    @heart-hacker-nZz25T Jul 8, 2009

    Thanks for the link......

  • easels

    easels

    @easels-Hy3SwU Jul 17, 2009

    HEART-HACKERHi 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

    @easels-Hy3SwU Jul 17, 2009

    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

    @debu-62iszV Jul 17, 2009

    @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

    @heart-hacker-nZz25T Jul 18, 2009

    easelshey 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.... πŸ˜•