VS 2008 Error When Open SqlConnection?
Jul 6, 2010
When i connection on database Microsoft SqlServer 2008 By This code.
Code:
SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings["myconnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("select * from [City]", cnn);
cnn.Open();
Code In configration Manager
Code:
<add name="myconnection" connectionString="Data Source=.;Initial Catalog=db;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
found this Sql Exception:
The user instance login flag is not supported on this version of SQL Server. The connection will be closed. what is problem?
View 19 Replies
Similar Messages:
Dec 29, 2010
I have a strange problem in my ASP.Net 3.5 application. When multiple users try to access the same page (which has some long running methods), the application crashes at a point where it tries to open a connection to the database (a static method inside a static class). It appears that the connection is already open. However, this does not happen when there is only one user using the application. What I cannot understand is that how do actions of one user affect the other in a web application?
I double checked that all my open connections are being closed after performing their operation by appending a line of text to a text file whenever a connection is opened or closed. The number of opened and closed connections was equal. Also, the connections are opened and closed from one place only, where the close method is inside a Finally() block.
View 1 Replies
Feb 11, 2010
I am not used to work with SQL Server(usually I just use express). I run it on windows server 2008, iis7.
I have attached the database to my sql server. I made a web site in iis7 but I get this error message.
Cannot open database "Phaeton.mdf" requested by the login. The login failed.
Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Connectionstring I use
<add key="PhaetonConnectionString" value="Data Source=.;Initial Catalog=Phaeton.mdf;Integrated Security=True"/>
View 5 Replies
Jun 8, 2010
here's what i did. on my desktop computer, i first installed VS 2005.. after few weeks i installed VS 2008.. i created a project on VS 2008. on my laptop, i installed VS 2008. i transferred the project from my desktop to my laptop but i can't open it.. one of my clasm8s said told me that even if i created it on VS 2008 on my desktop, it still uses framework 3.0 because VS 2005 was the first installed.. is he correct? what should i do?
View 1 Replies
Dec 22, 2010
I have to open pdf documents from my website. I was thinking of just doing a simple <a href...> to the pdf document. I noticed that in other places on our websites the programmers always do it in the code-behind using the following code : With Response
.ContentType = "application/pdf"
.WriteFile(directory and document location)
.End()
End With.
View 3 Replies
Jun 11, 2010
I Downloaded MVC MusicStore sample and tried to open the solution (MVCMusicStore.sln) from Visual studio (SP1) .But it gives me the error "The selected file is a solution but was created by a newer version of this application and cannot be opened.
So I downloaded Townhall application and tried to open the solution from VS2008. Then I get the error Townhall.Azure.ccproj cannot be opened because its project type ccproj is not supported by this version of the application.
NB : I have MVC2 Installed
How do I open these projects
View 2 Replies
Jul 6, 2010
i want to pass a query string with window.open of javascript
but since the sql query uses single quotes, there is some error
How can i handle this
Given below is the sample(The starting quote of SalesEmp is ending the single quote where window.open has started)
javascript:void(window.open('DetailedGraph.aspx?SqlQry=select SlpName, MonthYear, Sum(DocTotal)/100 Invtotal, max(Year) Year, max(MonthNum) MonthNum from OCT_VIEW_DB_Sales where SlpName='SalesEmp' ')
View 7 Replies
May 4, 2010
Code:
[code]....
Secondly,I want to open the form a Modal Dialog Box,Is It Possible?/
View 6 Replies
May 17, 2010
i would like to know if there's something wrong in this asp.net code:
mydatareader = mycmd.executeReader()
if myDataReader.HasRow then
// Do something
end if
myConnection.Close()
If i avoid to call a "MyDataReader.Close()" does the connection close anyway ? I ask this because i'm assuming that if call a "MyConn.Close" it automatically close the associated datareader... or am i wrong ?
View 4 Replies
Jan 15, 2010
I need to create a 'select/open file' template so it can easily be pulled into any page by any other Developer.
View 31 Replies
Nov 24, 2010
why Visual Studio is not showing the last project open. Actually it's not showing any that I have had open. If there a clitch.
View 2 Replies
Oct 5, 2010
I was using VS2008 everything ws going well but one day because of some problem i have to reload the windows and VS2008 and since then i am unable to open the designer.It does not give me any error message but i am unable to use any of the feature after clicking design or view designer from solution explorer.I have tried reinstalling the VS2008 but it does not solve my problem.
View 1 Replies
Mar 31, 2010
I am trying to open an existing asp.net app. on my local machine with VS2008. The app. resides in a folder on the Windows 2003 Server. The app. runs on our intranet. Recently, a change was made to the app. directly by opening one of the files in the solution and adding maybe a couple of lines of c# code and saved back. Of course this would not make a difference as its not been re-compiled.
I copied the whole folder where the app. resides on the server to my desktop and then tried to open the solution with VS2008, it came up with a prompt saying the app was written using a previous version of Visual Studio and needed to be converted to VS2008 format, I followed the intructions, but it failed saying something like "...failed to make a backup etc", it wouldn't open the solution.I have successfully open other apps this way but this one particular one would not just open. All I want to do is to use VS2008 to recompile and publish back to the server. I have tried using VS2005, it just says the app. was created by a newer version of the application...
I think the app was built sometime btw 2004 - 2008. Also, if it is relevant, the folder where the app. resides on the server has a globe icon, don't know if its an IIS thingIs there any other way to compile this .net app. without using VS2008,
View 1 Replies
May 22, 2012
How to read/open a pdf file from web site existing on remote file share?
View 7 Replies
Mar 3, 2011
When i try to open a csv file from my asp.net 3.5 app by clicking on the link provided, a file download dialog box appears.When i click on the open button from there , i get this eror
C:Documents and settingsUserNameLocal SettingsTemporary Internet FilesContent.IE5X9TXTM06myfilename.csv could not be found .Check the spelling of the file name and verify that the file locationis correct?
Wjy am i getting this error? I am trying to open a file and it complains about file not found in the Temporary Internet Folder.I tried deleting the temp intrnet files.Dint work.I have IE 7 on xp professional sp3. Also i am streaming the file from the application. This happens only to some files and the rest of the files , i can open .
View 1 Replies
May 7, 2010
I have th following code:
[Code]....
I got any error from the code, saying 'not all code path return a value', i suspect it is the catch block doesnt return a value. If so, what value should i return?
View 4 Replies
Feb 24, 2011
I have an existing project with a silverlight3 app. First I created SALESservice.svc.This is working fine. Now I added another TARGETservice.svc to my project and rebuilded my entire project but when I am trying to add the service reference in to the silverlight app I get the following error:
There was an error downloading metadata from the address.verify that you have entered a valid address. I didn't write any code in ISALESservice.svc AND ITARGETservice.svc . I have written in SALESservice.svc.cs AND TARGETservice.svc.cs files.Is this causing error? But for SALESservice.svc it is working. I didn't add any code in web.config file.
View 1 Replies
Nov 13, 2010
I am trying to streamline the look of my site and I was wondering if there was a way to use the onclick of an image to open up a <input type="file.../>? I want the input to be invisible so it doesn't add clutter to the interface. Here is ultimatly the flow I would ideally have... Image click -> Javascript calls input open. User clicks "open" in the dialog, Input calls some Javascript that calls the click event of the inviable "upload" button. Boom. User clicks image, selects a new one, and I have it automatically on my server without the need for two more buttons... Anyone know if these types of events/functions exists and if so what they are called and how to capture them? Or should I stop making this over complicated and use the method that I know works?
View 6 Replies
Apr 20, 2010
I started working on an Asp.net MVC website using Visual Web Developer Express 2008 a while ago. Just recently, I managed to get my hands on a copy of Visual Studio 2008 Professional (through DreamSpark ). I installed the Service Pack, and also the MVC2 files for Visual Studio.
However, now I can't open my project anymore. When I try to open the solution in Visual Studio, it tells me that the project type is not supported. Does this mean that I have to resort to using VWD Express again? Is there perhaps some way that I can edit the project file so that it will load and compile correctly?
Note: I installed MVC2 through the Web Platform Installer, and it says that it installed successfully. However, I notice that MVC references in my unit-test project don't seem to be resolved either - is this perhaps because MVC2 isn't actually installed properly?
View 2 Replies
Jun 11, 2010
I am using Visual Studio 2008 Professional Version.i am trying to open a database of a starter kit which was created also created in VS 2008.everytime i try to open the database i get this message window: i don't know why i am getting this message i am using VS 2008 Profession Full Version
View 3 Replies
Feb 3, 2010
we can open an SQL Server 2005 DB in SQL Server Management Studio 2008 EXPRESS, woith out it converting to 2008?We want to connect to a remote sql 2005 server in sql server management studio 2008 EXPRESS.
View 1 Replies
Mar 20, 2013
I tried simple code like this using href element. But it tries to open the sheet.xls in the browser window and says it can't find the file. I want the excel file to be opened in excel (not browser).
<a href="file://domainname/vol1/destinationfiles/sheet.xls" >some excel file</a>
View 1 Replies
Mar 4, 2010
i have 5 methods in classA. each and every methods i have open the sqlconnection and close it, instead of that is there anyway to create a sqlconnection at one time if its opened then no need to create a new connection, if its closed then we have to connect.
View 5 Replies
Aug 28, 2010
I always use SqlConnection() To open a connection then use the connection to interact database. But I have heard somewhere that opening SQLconnection() take a time. and if on different pages of projects I repeatedly Connect database then It will take long access time always. So I want to know that if there is any other methods which don't use the SQLConnection to interact database and increase the response time of database.
View 1 Replies
Jan 17, 2011
so i have the function below in a webservice. and it works, but when i try to copy it to aspx page code behind, i get the message in the subject. Can someone tell me if the function below is valid? One of my project uses it and it works.
[Code]....
View 5 Replies