Hello,
First off i like to apologize for the many questions but i am excited to get into C# programming and how easy and fun it is to program especially with SQL database, i also like to apologize for the last post, posted in the wrong location, dont know how to remove for everyones convennience so my bad.
QUESTION: I am getting this message that is halting fun production. I have made sure that I have a primary key in the database of SQL 2005 server, using C# I am trying to import the database or at least use it as a reference to store information on the database by doing data->add new data source -> add sql db -> then browsing to my database I created but gives me the error message, I made sure I have permissions, heck I created the database so I should be able to do whatever. Is there anything I a missing or a step(s) I need to do?
the message says "this file is in use" "enter a new name or close the file's that's open in another program" i dont have SQL management studio opened or nothing, no database program is running just the C# IDE, whats the deal? the first time it started i didnt have permissions, but got that resolved by manually adding me on SQL management studio database name, but now i get that error message above, what am i doing wrong?
linking SQL database with C# problem
Started by Siten0308, Jun 23 2008 01:37 PM
14 replies to this topic
#1
Posted 23 June 2008 - 01:37 PM
|
|
|
#2
Posted 24 June 2008 - 09:05 AM
Hello Everyone,
Ok i got past that problem, where it says the database is being in use, what i did was i shut down the SQL server service and it is now being able to select the database without getting that error message. HOWEVER there is a new hurdle to jump over, since i got it now i try and click on to use that it shows loading but then it gives this error message: an error has occured while establshing a connection to the server./ when connecting to SQL server 2005, this failure may be causing by the fact that under the default settings SQL server does not allow remote connection." any ideas? i made sure the management configuration in SQL has TCP/IP enabled, Local Enabled and Pipes enabled however is there something i am missing?
Ok i got past that problem, where it says the database is being in use, what i did was i shut down the SQL server service and it is now being able to select the database without getting that error message. HOWEVER there is a new hurdle to jump over, since i got it now i try and click on to use that it shows loading but then it gives this error message: an error has occured while establshing a connection to the server./ when connecting to SQL server 2005, this failure may be causing by the fact that under the default settings SQL server does not allow remote connection." any ideas? i made sure the management configuration in SQL has TCP/IP enabled, Local Enabled and Pipes enabled however is there something i am missing?
#4
Posted 24 June 2008 - 10:21 AM
Hello Xav, I have tried that however then the message pops up "this file is in use" "enter a new name or close the file's that's open in another program" so i stop the service then i can access it, the interesting thing when i go to SQL 2005 surface area configuration, i go to analysis services then to remote connection, i click on it and it gives me an error message saying "the serverproperty with name='network\listenonlyonlocalconnections' doesnt exist in the collection"? do you think that this might be the problem?
#5
Posted 24 June 2008 - 11:10 AM
Unfortunately, I'm no SQL expert. I tend to use XML files for most things, but perhaps your SQL installation is corrupt? I don't want to recommend a reinstall if it's unnecessary, but it's a possibility.
Has this error only recently started occuring? Did you change anything?
Has this error only recently started occuring? Did you change anything?
#6
Posted 24 June 2008 - 01:00 PM
Hey Xav, well tried to uninstall reinstall but stupid error keeps coming up, i saw there is a way to create an SQL database from C#, i tried that but still same thing, cant create database from C# visual studio, going to try on different PC and let everyone know the outcome, thank you for all or any information.
#8
Posted 25 June 2008 - 12:18 PM
Sorry bout that and the late response, however i uninstalled it, reinstall nothing, still the same problem, getting frustrated so i found a free version of SQL express, installing it right now, including management studio express, creating a new database and see if i get the same issues, please let me know if anything. Also jordan gave me an infraction, for what exactly?
#10
Posted 26 June 2008 - 11:47 AM
I am going to try another thing, making sure i have all the updates, i found a nice website for basic troublehsooting SQL, this guy wrote an entire page on this error i am getting, that is only connecting to SQL using managemnet studio, but still probably same concept, did all his things such as port changing, firewall turned off, verify name etc but still nothing, i am going to do SP2 on SQL 2005, maybe an update issue. will let everyone know the outcome. wish me luck
#11
Posted 30 June 2008 - 12:19 PM
Hello,
I am finally back, i got a huge problem after installing vista SP1, dont install it, worst mistake ever, after installing it my computer crashed beyond recover, so after i reinstalled vista, installed C# sdk with sql 2005 express, now everything works, i am able to import all database and everything, the problem i am guessing is when i installed C# sdk, i did not install SQL with it, probably a tool to help link between the two, and later installed SQL 2005 standard edition without that link they dont know each other, no matter how much you try and point to each other, without installing SQL with C# package, it wont work, so let it be known, when installed C#, include everything!! i am fixed now thanks for everyones input and help.
I am finally back, i got a huge problem after installing vista SP1, dont install it, worst mistake ever, after installing it my computer crashed beyond recover, so after i reinstalled vista, installed C# sdk with sql 2005 express, now everything works, i am able to import all database and everything, the problem i am guessing is when i installed C# sdk, i did not install SQL with it, probably a tool to help link between the two, and later installed SQL 2005 standard edition without that link they dont know each other, no matter how much you try and point to each other, without installing SQL with C# package, it wont work, so let it be known, when installed C#, include everything!! i am fixed now thanks for everyones input and help.


Sign In
Create Account


Back to top









