Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C# Programming

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

C# Programming C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-2008, 04:37 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Question linking SQL database with C# problem

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-24-2008, 12:05 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Default Re: linking SQL database with C# problem

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-24-2008, 01:14 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,055
Last Blog:
Web slideshow in JavaS...
Credits: 1,024
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: linking SQL database with C# problem

I think you need the SQL Server Service to be running in order to use SQL databases. Perhaps try re-enabling and see what happens.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-24-2008, 01:21 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Default Re: linking SQL database with C# problem

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-24-2008, 02:10 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,055
Last Blog:
Web slideshow in JavaS...
Credits: 1,024
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: linking SQL database with C# problem

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?
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 06-24-2008, 04:00 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Default Re: linking SQL database with C# problem

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-25-2008, 01:53 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,055
Last Blog:
Web slideshow in JavaS...
Credits: 1,024
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: linking SQL database with C# problem

Can't wait for the result.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-25-2008, 03:18 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Default Re: linking SQL database with C# problem

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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-25-2008, 03:58 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 7,055
Last Blog:
Web slideshow in JavaS...
Credits: 1,024
Rep Power: 58
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: linking SQL database with C# problem

See what it says in the infraction message.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-26-2008, 02:47 PM
Siten0308 Siten0308 is offline
Learning Programmer
 
Join Date: Jun 2008
Posts: 81
Credits: 68
Rep Power: 2
Siten0308 is on a distinguished road
Default Re: linking SQL database with C# problem

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
C# with SQL database Siten0308 C# Programming 6 06-24-2008 09:33 AM
Tutorial: Advanced SQL Jordan Tutorials 2 04-07-2008 03:18 PM
Linking a Form to a SQL Database newguy15 Database & Database Programming 2 12-04-2007 02:13 AM
Best program for SQL database manipulation Rhadamanthys Database & Database Programming 3 07-02-2007 02:32 PM
Database Tuning Advisor in SQL Server 2005 reachpradeep Database & Database Programming 0 03-03-2007 12:46 PM


All times are GMT -5. The time now is 12:22 AM.

Contest Stats

Xav ........ 1024.41
MeTh0Dz|Reb0rn ........ 974.08
morefood2001 ........ 850.04
John ........ 841.93
WingedPanther ........ 661.52
marwex89 ........ 575.59
Brandon W ........ 447.33
chili5 ........ 292.12
orjan ........ 187.41
Steve.L ........ 181.88

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 79%

Ads