How to connect Visual Studio 2010 Express C # to SQL Server Express

Is there any real workaround for getting Express Edition C # related to database options other than the allowed lightweight options (Access, SQL Compact or SQL file)? As noted elsewhere, this is possible in the web edition. It was also noted that you can create a project file, open it in the web version, create a connection and create a project with your database entities, and then return to C #.

However, as a workaround, this is pretty awkward, since it seems that if I could just get the SQL connection in my C # Database Explorer, which seems to be related to the application, and not to any project, then I will forever can be added to the database without having to constantly switch back and forth.

Has anyone worked on this issue?

+4
source share
4 answers

I figured out how to improve a workaround. Application settings seem to be saved in [Documents and Settings] \ [User] \ Application \ Microsoft \ VCSExpress \ 10.0 and VWDExpress \ 10.0. I found that copying ServerExplorer \ DefaultView.SEView from VWDExpress to VCSExpress after creating the connection in WD works fine. I could create new objects from there, update data, create a database from a project, etc.

+3
source

yes get .net connector: http://dev.mysql.com/downloads/connector/net/

Use the add link to specify DLLs and use their functions to connect to mysql server

+1
source

Okay. Just to clarify all this ... I'm on Windows 7 and I'm on my machine.

You may need to change permissions on the following folders in the usual way.

I have Visual Studio C # express edition on my machine with Visual Web developer Express. I cannot browse the local SQL server using C # express and connect to the database. Therefore, I followed the method described above.

Open a regular explorer window and select:

C: \ Documents and Settings \ YOURUSERNAME \ Application Data \ Microsoft \ VCSExpress \ 10.0 \ ServerExplorer

rename DefaultView.SEView to DefaultView.SEViewORIGINAL

Open another explorer window and go to:

C: \ Documents and Settings \ YOURUSERNAME \ Application Data \ Microsoft \ VWDExpress \ 10.0 \ ServerExplorer

Copy the DefaultView.SEView file and paste it into a folder in another explorer window.

You will now have 2 files in the folder

DefaultView.SEView
and
DefaultView.SEViewORIGINAL

If you open visual studio C # express 2010, you will see your databases. However, you cannot create a new one in this database. First you will need to create all new connections in VWDExpress and repeat the process.

Someone might want to check how easy it is to move the differences between these files and fix it this way.

Good luck.

0
source

Another work around.

Sorerons solution works only for local databases. You will get scary ... "your version cannot connect ... blah blah blah".
Thus, I opened the project in VWD ... connecting with Linq to sql classes. Voila, it worked. I had a project open in both vde and vwde at the same time. (I was in the process of copying project templates from my vis Express application to log into webd at the same time)

0
source

Source: https://habr.com/ru/post/1403176/


All Articles