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) ๐
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
-
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. -
HEART-HACKERCEMemberHi 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-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 -
CEMember
That's cool ๐HEART-HACKERYes its working properly in SQL server... I can use all DDL and DML statements perfectly
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 ?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
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-HACKERCEMemberThat'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-HACKERThanks for the link......
-
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 keptHEART-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) ๐
if it does not corrects then post it i will try another way -
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 -
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
I am not getting you.... ๐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
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...