|
Is the MDF file listed in your project in Solution Explorer? The problem usually occurs because the .NDF file is being copied to your Release or Debug folders along with your app's .EXE. The Server Explorer is looking at one version of the database (in your project folder) and your code is looking at the other copy of your database in the bin\Release or bin\Debug folder.
Wanna see? Just open your project folder and search all the subfolders for any files with the extension MDF.
|
|
|
|
|
That was the problem.
Another question:
Why is it that in some projects, the .mdf file is in bin\Release
and in other projects, the .mdf file is in the bin\Debug folder?
|
|
|
|
|
It'll be in either depending on which build configuration you use when you hit, well, Build.
|
|
|
|
|
OK, I deleted the Patient.mdf in Server Explorer.
Then I opened a New Connection and browsed to the .mdf file under the output directory (\bin\debug).
Now I can see the new column in Server Explorer.
But, how do I get it to appear in Data Sources of Solution Explorer?
|
|
|
|
|
You don't want to do that. You just have to understand that the Server Explorer will look at the copy of the database in the Project folder and your running code will look at the copy in the bin\ folders.
Why? Because when you build the project, by default, the database in the project folder will be copied to the bin\ folders every time you build the project. This will overwrite the bin\ folder copy, and any changes your code makes to it.
If this is a permanent change you want to make to the project folder copy, either use the SQL Server Management Studio to make the change, or the Server Explorer, or make the change with your code, then copy the bin\folder version up to the project folder.
|
|
|
|
|
Hi everybody
I need help in resolving an issue, as below.
After installing Visual Studio 2005, with SQL Server Express, on my PC; when I try to add a new connection it reports the following error:
"An error has occurred while establishing a connection to the server. When connecting to the SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipe Provider, error: 40 - could not open a connection to SQL Server)"
I am using the following parameters:
Data Source: Microsoft SQL Server (SqlClient)
Server name: Desktop ( this is the name of my PC)
Attach a database file: test.mdf (it is just for an example)
I have un-installed and re-installed the application twice but the problem persists.
I would appreciate any help.
Regards,
|
|
|
|
|
The Data Source should be .\SQLEXPRESS . The server name doesn't need to be filled in at all. And the Attach a database file should list the FULLY qualified path to the MDF file, not just the filename.
|
|
|
|
|
Thanks for the response.
The problem is that the drop-down list in the "Add Connection" dialogbox does not have the SQLEXPRESS Server name. Secondly, I select the attached database file by browse button and so it should not be a problem.
However, the installation of the SQL Server did not offer me to provide or suggest the Server name.
A more deep-down suggestion will be highly appreciated.
|
|
|
|
|
Click the Advanced button in that dialog. Then it's just a matter of filling in the blanks.
|
|
|
|
|
|
does S has any meaning while writing OOPS
object oriented programming S???
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: does S has any meaning while writing OOPS
Writing "OOPS" is a mistake in the first place. The term is Object-oriented programming[^], OOP.
There is no plural form "OOPs" of OOP. It would be like saying "gardenings" or "tv watchings".
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: It would be like saying "gardenings" or "tv watchings".
Borat would say it like that...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You just asked this question and it was already answered.
__________________
Bob is my homeboy.
|
|
|
|
|
how can i draw multiple image into the same picturebox using BitBlt function?
|
|
|
|
|
You can't, you'd have to build a composite image of those bitmaps. The picture box is just for people who want to put up a single image, it's assumed if you want to do more, you will draw it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am just a bit too lazy to spend a few hours finding it,if someone knows the location of the key i mentioned ,plz tell where it is.
|
|
|
|
|
Vivek Narayanan wrote: ,plz tell where it is.
Nope. Why? This is why...
Vivek Narayanan wrote: I am just a bit too lazy to spend a few hours finding it
|
|
|
|
|
HEY!,Not Fair,anyone else?
|
|
|
|
|
Whats not fair is saying "I'm too lazy to do it myself", then expecting someone to do it for you. Do your own damn work!
|
|
|
|
|
Hi all,
I got syntax error when I update the database, and I don't know what I;m did wrong. Can some of you give me some hints
I have a database table, with the field "First Name","Last Name" ,
"Phone","Age" and "Status"
I don't know is the problem due to the tag "First Name" with the space character?
the following is my code for create OleDbDataAdapter:
<br />
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(selectCommand, connection)<br />
<br />
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey<br />
<br />
adapter.InsertCommand = New OleDbCommand( _<br />
"INSERT INTO wpGuest (First Name, Last Name, Phone, Age, Status) " & _<br />
"VALUES (?, ?, ?, ?, ?)", connection)<br />
<br />
<br />
adapter.UpdateCommand = New OleDbCommand( _<br />
"UPDATE wpGuest SET First Name = ?, Last Name = ? , Phone = ? , Age = ? , Status = ? " & _<br />
"WHERE First Name = ?", connection)<br />
<br />
<br />
adapter.DeleteCommand = New OleDbCommand("DELETE FROM wpGuest WHERE First Name = ?", connection)<br />
<br />
<br />
' Create the parameters.<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Last Name", OleDbType.Char, 50, "Last Name")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Phone", OleDbType.Char, 50, "Phone")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Age", OleDbType.Char, 50, "Age")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Status", OleDbType.Char, 50, "Status")<br />
<br />
<br />
<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Last Name", OleDbType.Char, 50, "Last Name").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Phone", OleDbType.Char, 50, "Phone").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Age", OleDbType.Char, 50, "Age").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Status", OleDbType.Char, 50, "Status").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
DataRowVersion.Original<br />
<br />
<br />
adapter.DeleteCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
DataRowVersion.Original<br />
<br />
|
|
|
|
|
It's not a good idea to put spaces in field names. If you do, they MUST be delimited by square brackets, like this:
INSERT INTO wpGuest ([First Name], [Last Name], Phone, Age, Status) VALUES (?, ?, ?, ?, ?)
|
|
|
|
|
How to get the access permissions on a folder in VB.net?
I need to get which all users and groups have which type of permissions on a Folder .
In web development.
Please help
Rose
|
|
|
|
|
The Article by Softomatix in CP.
Hope this article will help you.
Regards,
Satips.
|
|
|
|
|
Can I do the coding for chechking the permission in my application.
Rather than using external components ?
Thanks in Advance
|
|
|
|
|