Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Can't Connect To Sql Server Database With Same Connection Used In Visual Studio .net 2003


I have the following code that works fine in visual studio .net 2003 but not with VWD.  I have sql server 2000 developer edition installed locally and this connection works fine with visual studio.  With VWD it fails with the exception "System.Data.SqlClient.SqlException: Login failed for user 'DARRELLASPNET'".  It fails on the conn.Open line.   any ideas on what the issue is?Dim conn As SqlConnectionDim connstr As Stringconnstr = "Data Source=DARRELL;Initial Catalog=Event;Integrated Security=SSPI;"Dim daEvents As New SqlDataAdapter("select * from events", connstr)Dim ds As New System.Data.DataSet

conn = New SqlConnection(connstr)conn.Open()daEvents.Fill(ds)



conn.Close()conn.Dispose()




View Complete Forum Thread with Replies

Related Forum Messages:
Need Help To Get Visual Studio 2003 To Connect To SQL Server 2000
I need help setting up my laptop so that I can develop using Visual Studio 2003 and SQL Server 2000.  I currently have both installed on my laptop but can not get them to play nicely together.  Here is my connection code:

//string strConnection = "Provider=Microsoft.Jet.OleDb.4.0;";
//strConnection += @"Data Source=C:BegASPNET11ch12Northwind.mdb";
//Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=guest;Initial Catalog=Volkswagen;Data Source=DEREKLAPTOP;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DEREKLAPTOP;Use Encryption for Data=False;Tag with column collation when possible=False
string strConnection = "Provider=SQLOLEDB.1";
strConnection += @"Data Source=C:Program FilesMicrosoft SQL ServerMSSQLDataorthwnd.mdf";
////strConnection += @"Data Source=DEREKLAPTOP";
data_src.Text = strConnection;
string strSQL = "SELECT FirstName, LastName FROM Employees";
DataSet objDataSet = new DataSet();
OleDbConnection objConnection = new OleDbConnection(strConnection);
OleDbDataAdapter objAdapter = new OleDbDataAdapter(strSQL, objConnection);
objAdapter.Fill(objDataSet, "Employees");
DataView objDataView = new DataView(objDataSet.Tables["Employees"]);
dgNameList.DataSource=objDataView;
dgNameList.DataBind();


Here is the error message I get in IE:

No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.

Exception Details:
System.Data.OleDb.OleDbException: No error information available:
REGDB_E_CLASSNOTREG(0x80040154).

Source Error:





Line 18: OleDbDataAdapter objAdapter = new OleDbDataAdapter(strSQL, objConnection);
Line 19:
Line 20: objAdapter.Fill(objDataSet, "Employees");
Line 21: DataView objDataView = new DataView(objDataSet.Tables["Employees"]);
Line 22: dgNameList.DataSource=objDataView;
Source
File: C:BegASPNET11ch12datagrid.aspx    Line: 20

Stack
Trace:





[OleDbException (0x80040154): No error information available: REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'SQLOLEDB.1Data Source=C:Program FilesMicrosoft SQL ServerMSSQLDataorthwnd.mdf' provider is not registered on the local machine.]
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +81
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ASP.datagrid_aspx.Page_Load() in C:BegASPNET11ch12datagrid.aspx:20
System.Web.Util.ArglessEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +10
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750



Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032


I know that my problem is in the @DataSource part of the connection string.  It works if I use the first two lines (the database file is in the same folder as the code).  But not when I use it as above.  I think I'm pointing to the wrong place, but I can't figure out the right place to point to.  I have SQLServer running on my laptop (I think), so can anyone help me out or maybe give me some example connection strings that you have used?  Thanks.

Derek

View Replies !
Connect To SQL Server 2005 From Visual Studio 2003
hello all,

i have SQL Server 2005 installed on a network computer and want to access it through code in asp.net. I am using visual studio 2003.

I have porvided this connection string to connect to that Sql Server 2005 Express instance but failed:

data source=mynetworkstystemSQLEXPRESS;database=MobMatiLogs;User Id=sa;password=mobmasti786

But I get the error:

SQL Server does not exist or access denied.

Anyone please help me!

Thanks in advance

 

View Replies !
DB Connection From Visual Studio 2003 To Sql Server 2005
I have one computer running Visual Studio 2003, and another running SQL Server 2005.  I am trying (unsuccessfully) to add a connection to a sqlDataAdapter from an application in the Visual Studio 2003 computer to the db on the SQL 2005 machine.

 If I go to the machine running sql 2005, where I am running visual Studio 2005, I can create this connection with no problems.

 

Is there a way fromvisual Studio 2003 to create a sqlDataAdapter with a connection to SQL 2005?

 

 

View Replies !
SQL Server Connection Issue! Visual Studio 2005 Used To Connect!
Hello,
I'm using Microsoft Visual Studio to remotely connect to my database for the project I am working on.
I always get the same error, when I try to connect:




Code Snippet

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 Pipes Provider, error: 40 - Could not
open a connection to the SQL Server)
So, I decided to ping the server to see if any packets were being sent back to me, on the command prompt.
4 of my packets were sent to the server.
0 were sent back.




Code Snippet

Pinging sq15.bravehost.com [172.16.0.229] with 32 bytes of data

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 172.16.0.229:
Packets: Sent = 4, Recieved = 0, Lost = 4 (100% loss),
So, does the database not allow incoming connections, or am I missing something?

Thanks for the help in advance,
Dustin.

View Replies !
How To Connect From Visual Studio To A Ms Sql 2005 Database On A Server
Hello,

I have visual studio 2005 installed on my PC. I want to create a new website and I want the site to be connected to a MS SQL 2005 database that resides on my hosting account. I am thinking this can be done but I have watched videos, spent time looking for a site to help and I have hit a brick wall.

I have no idea how to do this.

Can anyone please help me with some instructions or a webpage that shows you how to do this.

Thank You

Joe

 

View Replies !
Problems Saving Edited SQL Database Functions With Visual Studio .Net 2003
I'm fairly new to using SQL Server and I'm having problems just trying to edit Functions in the SQL server database with Visual Studio .Net 2003.

View Replies !
Can Visual Studio 2005 BI Co-exist With Visual Studio 2003?
I ask because I'm still looking for the source of interface problems I have in using the SSIS designer.

View Replies !
Can't Connect To Database Using Visual Studio
I can't connect to a SQL Server 2000 database using Visual Studio 2008. When I try to create a SqlDataSource in Visual Studio the db server isn't in the dialog box. When I manually create a connection string it doesn't connect. 
When I go to the server, the db is running and apps that use it work fine. I can ping the server, and I can map a drive to it, but I just can't connect to the database. I tried using servername,port - didn't work.
I open SQL Server 2005 Management Studio and try to connect. In the Connect to Server dialog box, when I go to the Server Name dropdown and browse for my database server on the network, the server is not in the list. I tried entering the server name (and password, etc) but it doesn't connect. A different SQL Server 2000 database server does show up there.
 
 
 

View Replies !
Visual Studio 2003 And SQL Server Express
I'm attempting to connect to my SQL Server Express instance through Visual Studio 2003.  When I go to Data Connections, I choose the Microsoft OLE DB Provider for SQL Server, then fill in all the parameters for my server (server name, username, password, database).  When I click "Test Connection" it goes through successfully.  When I click "Ok" to create the Data Connection, it fails saying that the username and password should be checked.  I changed the username and password to the "sa" account I created when I installed SQL Server Express, and got the same successful connection test, but failure when it tries to create the connection.  Any suggestions?  Thanks!

View Replies !
SQL Server Mobile With Visual Studio 2003
I've recently noticed the availability of SQL Server Mobile, and would
like to take advantage of some of the new features, however, I'm
currently using Visual Studio 2003. The requirements state that Visual
Studio 2005 is required, but I was wondering if anyone has had any
success getting it to work with VS 2003?



I hope that I can do this with VS 2003, but if VS 2005 will be
required, I'd like to clear up a few issues before asking my workplace
to fork out more money for the upgrade:


What have your experiences been like in getting clients to
upgrade from SQL Server CE to SQL Server Mobile? I've seen some
postings regarding problems with specific devices which seem a bit
worrying, but I was wondering how easy it was in general.


Does SQL Server Mobile really do a good job of reclaiming wasted
space? Using SqlCeEngine's Compact method has caused problems due to
the required storage space to perform the operation.


The documentation states that using SQL Server 2000 with SP3A is
supported, but I was wondering if anyone has any experience with this?

Thanks in advance,

Adrien.

View Replies !
Connect To MS SQL Database Using Visual Studio.net Failed
Hi,
I'm trying to connect to MS SQL 2000 using visual studio.net in window server 2003.
Clicking the server explorer, connect to database icon, and selecting the provider and so on, when i click on the 'test connection', an error appear indicating :

"Test connection failed because of an error in initializing provider. Device activation error. The physical name : c:MCSDWebappsChapter05vbADOsnippersContact.MDF may be incorrect "

Note : I'm connecting to window server 2003 locally i.e I'm working on the same computer i.e server 2003. I've tried in win XP Pro and it work successfully.

Any help is greatly appreciated.

For your info, I'm following the example on the MSPress Book : Developing web application using visual basic.net and visual c#.net 70-305

Thank in advanced.

View Replies !
Does Visual Studio .NET 2003 Contain SQL Server Report Service?
Hello, everyone:

Some papers introduce that SQL Server Report Service is intergrated in Visual Studio .NET 2003 as Business Intelligence Project in New Project. However I cannot find out Business Intelligence Project after I installed Visual Studio .NET 2003 (Full install).

Are there different versions of Visual Studio .NET 2003 contain SQL Server Report Service?

Thanks

ZYT

View Replies !
Can I Use MS SQL Server Express 2005 In Visual Studio 2003?
 


I have been experiencing troubles since I was decided to install SQL Server Expr 2005 in my PC, first I needed to remove the .NET framework 1.1 in my computer because it is suggested before installing sql server expr 2k5 that cause my vs.net 2003 to stop loading because sql express runs in .NET framework 2.0 and vs.net 2003 is in .Net Framework 1.1 then what I did is to install .Net Framework 1.1 in my PC together with .Net Framework 2.0 and my vs.net started runnning again.
 
My problem now is when I try to connect to a database using Data Link Properties in the Server Explorer it says "[DBNETLIB][ConnectionOpen](Connect()).]Sql server does not exist or access denied." how could this happen if I can see the sql server in the Server Explorer in my VS.net environment?
 
Please somebody help me I am just learning to this language and I think I cannot proceed to the next few chapters remaining because of this.
 
Thank you very much!

View Replies !
Use SQL Server Express 2005 With Visual Studio 2003
Hi, is it possible to use SQL server express 2005 with visual studio 2003?

i've some problems...

Thanks

View Replies !
Whether SQL Server 2005 Express Edition Can Work With Visual Studio 2003 (Ver 1.1)
We are new to SQL Server 2005 Express Edition. We are going to develope a solution for one of our client and we have to decide on which database to use for the solution. Client wanted to have a low cost solution. Thus we were not in a position to push them for SQL Sever 2000.

In the process, we also thought of having MySQL as one of the option. Another option we have is to use SQL Server 2005 Express Edition.

We wanted to know if SQL Server 2005 Express Edition can be used with Visual Studion 2003 (Ver 1.1)  or it can only be used with Visual Studio 2005 (Ver 2.0)?

Hope to get feedback soon.

Regards

Sanjeev

 

 

View Replies !
Connecting Visual Studio 2003 To SQL Server Express 2005 Edition
I was wondering if it is possible to connect the SQL Server 2005 Express Version to Visual Studio 2003.If its possible , how can it be done?Cos i seem to have an error if i do so.

View Replies !
Using Visual Studio 2003 With Sql Server 2000 And Planning To Switch To Sql Server 2005
We have a project already developed iusing VS 2003 Enterprise architect edition using sql server 2000(have lots of table and stored procs etc.)
Now planning to switch to Sql server 2005 are there any issues associated with the switch.
 
I mean front end programming wise asp.net and vb.net front end codes do they work straight away or need to make any changes to all the front end codes, we are using datasets, data readers calling stored procs and also using lot of hash tables and XML object to make bulk loads to sql server via sqlxml3.0 sp3.
Please help thank you very much for the information.

View Replies !
Visual Studio 2005 Connect To SQL Server 7
Hi all,
Tried this for the first time this morning using a SQLDataSource and received the message:
"Database schema could not be retreived for this connection. Please make sure the connection settings are correct and that the database is online. This server version is not supported. You must have Microsoft SQL Server 2000 and later"
If possible, how can I connect to the SQL Server 7 as I have a small project to complee and all the data and tables exist on our SQL Server 7 installation.
 
Thanks for any pointers
Michael

View Replies !
Cannot Connect To Server Through Visual Studio .NET And Query Analyzer
Good day. I was able to connect to a database server using SQL ServerEnterprise Manager. The Server name specified on the tree isJOMARGON(Windows NT). But no server was detected using either VisualStudio .NET and SQL Server's query analyzer.I highlighted one database (master) on the SQL Server EnterpriseManager and chose 'SQL Query Analyzer' under the 'Tools' menu. Itworked. The Title of the Query Analyzer window isSQL Server Analyzer - [Query- JOMARGON.master.JOMARGONJM Gonzalezand below on the status bar, I can seeJOMARGON(8.0) and JOMARGONJM Gonzalez(52)But again, I cannot connect manually using Query Analyzer as nothing islisted in the SQL Server drop-down listThanks

View Replies !
Problem - Using Visual Studio To Connect To Remote SQL Server
Hi,I am a newbie at all this, but here's what I want to do: We have avery large database sitting on a SQL server that is on a remotecomputer. I can access it through remote desktop and browse theEnterprise Manager and the DB.What I am trying to do is create a Visual Studio .Net program thataccesses the DB. Can I use a data adapter to connect to the DB? theSQL server is on the local C drive of the remote computer so it is notweb based.Otherwise I guess I'd have to install VS on the remote computer andcreate the program there.... but I'm guessing, I really need someadvice here.

View Replies !
Can't Connect To SQL Server 2005 In Visual Studio, Only SQLExpress Works?
Hi all,I'm having a big problem here. I can't seem to connect to a database of MSSQL Server 2005... Here is what I've did:1. Under the Server Explorer>Data Connections. Right click and choose "Add Connection..."2. Data Source was "Microsoft SQL Server Database File". Click OK.3. I browse to the database in the MSSQL.2/MSSQL/Data folder.4. Click on the "Advanced" button, and change the default DataSource from .SQLEXPRESS to .MSSQLSERVER. Click OK5.  Received this error:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) Only .SQEXPRESS that I was able to connect to... i've tried the solution from Microsoft, opened SQL Server 2005 Surface Area Configuration and enabled "Local and remote connections", checked the option "Using both TCP/IP and named pipes" but it didn't help. This is frustrating because I can't get the Membership provider, login to work on my host. Please help. Thank you very much,Kenny. 

View Replies !
Visual Studio Database File And SQL Server Management Studio Express Question
I have a database in my "App_Data" folder of my visual studio project.  I can view it fine in Visual Studio's built-in tools for managing a database attached to a solution.  However i recently started playing around with the SQL Server Management Studio Express program.  When i attach my database to Management Studio, and try to run my program it crashes.  I think it might be a permissions error?!? When i detatch it and reattach it in visual studio it runs fine again.   Any suggestions? ThanksJason 

View Replies !
Using RMO (Merge) In Visual Studio 2003 (.NET 1.1)
Hello,

is there any way to use RMO in .NET 1.1 application? Using "native" RMO is obviously unavailable (Microsoft.SqlServer.Replication namespace is not present in "add reference" dialog box in VS2003). I tried using ActiveX object (SqlMerge class v. 9.0 in sqlmergx.dll), but execution of Run() fails and "2.0 is not valid version" exception is thrown. For some reasons I must write application running in 1.1 Framework that allows synchronizing SQL 2005. And I mustn't use command line agent executable...

Thanks in advance

Kuba

 

View Replies !
How Do I Get The Database That I Am Using In Visual Studio Into My SQL Server Management Studio?
How do i get the database that i am using in visual studio into my SQL server management studio?
i need to create some scripts to create stored procedures on a live server.

View Replies !
WTB:Visual Studio Tools For Office 2003
License requiredMaybe you don't have this but have one of the products thatqualifies for the upgrade such as ...Visual Studio .NET 2003 ProfessionalVisual Studio .NET 2003 Professional Special EditionVisual Studio .NET 2003 Enterprise ArchitectVisual Studio .NET 2003 Enterprise DeveloperVisual Studio .NET 2002 Professional EditionVisual Studio .NET 2002 Enterprise DeveloperVisual Studio .NET 2002 Enterprise ArchitectVisual Studio 97 Enterprise EditionVisual Studio 6.0 Professional EditionVisual Studio 6.0 Enterprise EditionVisual Basic 5.0 (or later) Professional EditionVisual Basic 5.0 (or later) Enterprise EditionVisual C++ 5.0 (or later) Professional EditionVisual C++ 5.0 (or later) Enterprise EditionVisual InterDev 1.0 (or later)Visual J++ Professional Edition 1.1 (or later)Visual FoxPro 5.0 (or later) Professional EditionVisual SourceSafe 5.0 (or later)Visio 2000 Enterprise Editionthat you are willing to part with for some cash.Dan Thomas

View Replies !
Hide A Parameter Using Visual Studio 2003
I am using Visual Studio 2003 and would like to create a hidden parameter
that will be substituted into an MDX expression.  The parameter would be
based on the value of another parm which would be input by the user.  For
example, The user would select current year "2007" and my hidden parm would
need to calc to "2006".  I have coded the default value of my expression to
reflect current year - 1, however I  can't get the "hidden parameter" to be
invisible on the prompt screen.  Is this possible?  I already have many
parms on the screen and don't want to clutter with additional info the users
don't need to enter.

Thank you, PB 

View Replies !
SQL Express 2005 With Visual Studio 2003
I am just starting to work with Visual Studio and SQL.  I have Visual Studion 2003 with .net Framework 1.1.  I want to download the SQL 2005 Express version and it requires the upgrade to .NET Framework 2.0

Will this affect my Visual Studio 2003?  And can I use SQL 2005 with Visual Studio 2003?

Any help would be appreciated.

Thanks,

 

View Replies !
SQL Server 2005 And Visual Studio @005 Connection Problem.
I installed the SQL Server 2005 Trial and am now having trouble connecting. When I bring up the ASP.NET Configuration tool and Go to "Provider configuration"  "Select a single provider for all site management data" AspNetSqlProvider  Test I get the following message.

"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "

I have already run the aspnet_regsql command-line utility.

Can anybody give me some information on how to set this up.

I am currently working with the club web site starter kit.

View Replies !
SQL/CLR Debugging Hangs On Visual Studio 2003 And SQL 2005
I am unable to debug code from a SQL Database Project using the CLR.  After VS 2005 does the auto-attaching to the SQL server, VS hangs until I tell it to stop debugging.  Many others have reported this as a similar problem, however this only seems to affect me when I€™m connecting to specific servers.  Specifically it seems to be remote connections.  When I attempt to connect to my SQL 2005 Developer Edition €œlocally€? I get right through and can debug.
From my VS output window:


 

Auto-attach to process '[1688] [SQL] gx620-eric' on machine 'gx620-eric' succeeded.

Debugging script from project script file.

 

testing

No rows affected.

(0 row(s) returned)

Finished running sp_executesql.

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The program '[1688] [SQL] gx620-eric: gx620-eric' has exited with code 0 (0x0).


 

When I attempt to connect to a remote server running Enterprise Edition, it hangs after a successful attach. 

 


Auto-attach to process '[1856] [SQL] virtual2003eric' on machine 'virtual2003eric' succeeded.

 
Sometimes after countless attempts, I am able to get this to work, but lately I have had no success. As far as the SQL Server side, enabling and disabling the CLR through the Surface Area Configuration seems to be the only place to do anything relative to the CLR inside SQL server.
 

I have firewalls disabled. All SQL Servers presently have both SQL 2005 SP2 and Visual Studio 2005 SP1 installed.

 

I€™ve tried restarting servers and services, checking and un-checking €œAllow SQL/CLR Debugging€? and those steps did not work for me.

 

Does anyone have any insight on this one?  Any ideas on how I can further debug this one?

 

Thanks.

Eric

View Replies !
SQL 2005 Express And Visual Studio 2003 - Connecting
I have Visual Studio 2003 and had used it successfully with MSDE.  I recently upgraded to SQL 2005 Express and cannot seem to connect to the SQL server.  it appears in the list of servers on localhost, but when I try to create a new database it tells me that it "cannot create databases on this server."  It will not even open up any existing databases. 

I have .NET 2.0 installed.  I uninstalled SQL and reinstalled it, but nothing seems to help.  I feel I must be missing something, but do not know what. 

I no longer have the MSDE installation files, so I hope I can get Studio to talk to SQL Express. 

Any help is appreciated. 

View Replies !
How To Run SQL 2005 Report Designer With XP And Visual Studio .Net 2003
I´ve read that it´s possible to use SQL server 2005 - Report Designer even if you only have Visual Studio .Net 2003. But my question is where can I find/open this program.
I´ve installed all the developer programs from the CD´s (SQL 2005 Server Developer edition).
The shortcut in startmenu -> Programs -> Microsoft SQL Server 2005 -> SQL Server Business Intelligence Development Studio referering to C:ProgramMicrosoft Visual Studio 8Common7IDEdevenv.exe wich does´nt exist....cause I don´t have VS 8. And if I´ll point to devenv.exe in under the "Microsoft Visual Studio .Net 2003" -folder it won´t show any templates or wizard for Report Designer.

 

View Replies !
Visual Studio 2003(1.1 .NET Framework) SQL Server2005 Compatibility
Hello,

 

I had a simple question (I'm hoping).  Can a 1.1 .NET Framework ASP.NET website use  SQL Server 2005 Express edition for it's database?  Thanks. 

 

Brandon

View Replies !
Connecting To SQL Express 2005 Via Web.Config File In Visual Studio 2003
Hi
 I am following a project to build a small E-Commerce site from a book I have purchased and I have having problems connecting to the SQL Database with the code supplied.
The book is Apress Beginning ASP.NET 1.1 E-Commerce
http://www.amazon.co.uk/Beginning-ASP-Net-1-1-E-Commerce-Professional/dp/1590592549/ref=sr_11_1/202-7684451-7995058?ie=UTF8&qid=1193780707&sr=11-1
 The code added to the Web.Config file is :
<configuration>
<appSettings>
<add key="ConnectionString" value="Server=(local)NetSDK;Integrated Security=True;Initial Catalog=JokePoint" />
</appSettings>
 
The connection details are in a class file called Catalog.vb and is as follows
Imports System.Data.SqlClientPublic Class Catalog
Public Shared Function GetDepartments() As SqlDataReader
'Create the connection objectDim connection As New SqlConnection(connectionString)
'Create and initialize the command objectDim command As New SqlCommand("GetDepartments", connection)
command.CommandType = CommandType.StoredProcedure
'Open the connection
connection.Open()
'Return a SqlDataReader to the calling functionReturn command.ExecuteReader(CommandBehavior.CloseConnection)
End Function
Private Shared ReadOnly Property connectionString() As String
GetReturn ConfigurationSettings.AppSettings("ConnectionString")
End GetEnd Property
End Class
 The error is.....
Cannot open database "JokePoint" requested by the login. The login failed. Login failed for user 'MachineNameASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "JokePoint" requested by the login. The login failed. Login failed for user 'MachineNameASPNET'.Source Error:




Line 15: 'Open the connection
Line 16:
Line 17: connection.Open()
Line 18:
Line 19: 'Return a SqlDataReader to the calling function
Source File: C:MyCommerceSiteJokePointBusinessObjectsCatalog.vb    Line: 17 Stack Trace:




[SqlException: Cannot open database "JokePoint" requested by the login. The login failed.
Login failed for user 'MachineNameASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
JokePoint.Catalog.GetDepartments() in C:MyCommerceSiteJokePointBusinessObjectsCatalog.vb:17
JokePoint.DepartmentsList.Page_Load(Object sender, EventArgs e) in C:MyCommerceSiteJokePointUserControlsDepartmentsList.ascx.vb:44
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

The connection tests ok in Visual Studio 2003. All permissions are set using SQL Management Studio Express 2005.
The book is using SQL 2000, I have been trying different connection syntax's in the Web.Config file all day and now I have a big headache. I know its something simple, can anyone please advise ?
Thanks in advance.
 
Mark

View Replies !
Suppress Rows With No Data In Matrix Report - Visual Studio 2003
I would like to suppress all of the rows in my Matrix report that have either NULL or 0 data.  I know how to apply a filter in a table report to accomplish this.  However, I'm not sure how to do this in with a matrix because I need to filter if the subtotal in the row is 0, and the subtotal is generated by Visual Studio. There is 1 data value which expands across 4 columns with a subtotal at the end of the row.  I tried referencing the subtotal at the end of the row with a "Report!Item" expression, but Visual Studio tells me I can't reference a "Report!Item" in a filter.  Does anyone know how to do this with Visual Studio 2003? 

Note:  My data is coming from an AS400 file.  For simplicity, It consists of a description, an amount, and a flag which indicates a category.  The category flag is the grouping across the top, the descripion is down the side of the report. 

Data sample:
desc.      amount    category
paper        5.00        1
paper        7.00        2
paper        4.00        3
paper        6.50        4

Matrix:
descr            1        2      3      4        Total
Paper        5.00    7.00  4.00  6.50    22.50

Thank you,  PB 

View Replies !
How To Connect SQL 6.5 From Visual Studio?
Hi,

As a development environment, I installed both Visual Studio 6.0 and SQL 6.5 developer edition
on a standalone WinNT 4.0 workstation. When I tried to create a new project in Visual Studio, it
first asked me to specify a server and mode. I don't know what I should use to specify my local
server to get connected. I tried "." and "(local)", but neither worked. Can somebody shed some
light on this? Do I need to install other things to get connected to the server? Your help is greatly
appreciated.

Dan
dan_tu@compuserve.com

View Replies !
Sqlcommand And Visual Studio Net 2003 Code To Update A Record With A Click Of Button.
Hello to everyone,  I have this problem If I use this code when I try to update a record in my sql database It does not do anything. This is the code.  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim myconn As New SqlConnection("Data Source=.;Initial Catalog=SistemaIntegral; user id=sa")        Dim mycmd As New SqlCommand("presup", myconn)        mycmd.CommandType = CommandType.StoredProceduremycmd.parameters.Add(New SqlParameters("@txtClave", SqlDbtype.int,4)).Value=txtClave.textmycmd.parameters.Add(New SqlParameters("@txtForig", SqlDbtype.varchar,50)).Value=txtFOrig.textmycmd.parameters.Add(New SqlParameters("@txtFmod", SqlDbtype.varchar,50)).Value=txtFmod.textmycmd.parameters.Add(New SqlParameters("@txtFeje", SqlDbtype.varchar,50)).Value=txtFeje.textmycmd.parameters.Add(New SqlParameters("@txtPorig", SqlDbtype.varchar,50)).Value=txtPorig.textmycmd.parameters.Add(New SqlParameters("@txPmod", SqlDbtype.varchar,50)).Value=txtPmod.textmycmd.parameters.Add(New SqlParameters("@txtPeje", SqlDbtype.varchar,50)).Value=txtPeje.text mycmd.parameters.Add(New SqlParameters("@txtClave", SqlDbtype.int,4)).Value=txtClave.text        myconn.Open()        mycmd.ExecuteNonQuery()        myconn.Close()        mycmd.Dispose()        myconn.Dispose()    End Sub  This is the code for the procedure called "presup" in SQL 2000 Server.CREATE PROCEDURE [presup](@txtClave [int],@txtForig [varchar](50),@txtFmod [varchar](50),@txtFeje [varchar](50),@txtPorig [varchar](50),@txtPmod [varchar](50),@txtPeje [varchar](50),@txtIdPresupuesto [int])as Update [Presupuesto]Set [IdClave]=@txtClave,[orig]=@txtForig,[moda]=@txtFmod,[ejer]=@txtFEje,[origr]=@txtPorig,[modar]=@txtPmod,[ejerr]=@txtPejeWhere ([IdPresupuesto]=@txtIdPresupuesto)GO When I click the Update button of my webform it does not do anything. Please Help me I am new to Visual Studio.Net 2003. (2 weeks ago I started using Visual Studio) 

View Replies !
Can I Use Reporting Services 2005 Reports On An ASP.NET Page Created With Visual Studio 2003?
Hello,
 
I've seen this question floating around, but I have not been able to find a definitive answer.
 
Can this be done, and if so, what do I need to install into Visual Studio 2003?
 
Thank you.
 
-Gumbatman

View Replies !
Can't Connect W/Visual Studio 2005
I'm right-clicking on Data Connections in Server Explorer, and selecting Create New SQL Server Database. I've turned on the SQL Browser, so I'm able to select the instance from the combo box. I select Use Windows Authentication, type the database name to create, and click OK.

I'm getting this error:


"An error has occurred while establishing a connection to the server.  When connecting to 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 Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

I've followed the instructions here, but with no luck:


http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

Is there something else I need to do?

Thanks,
Jeff

 

View Replies !
Refresh A Report On Page Load??(Reporting Services 2000, Visual Studio 2003)
Hi,
 
I'm still quite a beginner with the Report Designer and now I have faced a problem. My goal is to make a reports refresh each time it is loaded. I know that this can be done by using rs:clearsession = true-method but in order this to work, it should be added to each link. There are a lots of links in the reports we are using and therefore it would be more practical to find another way to refresh the report on page load. Is there any way to do this with some kind of code attached to each report? I'm using Visual Studio 2003 and my Reporting services 2000.

View Replies !
Cannot Connect To Localhost From &&"Server Explorer&&" In Visual Studio 2005.
 

hi ,

 

I am trying to connect to my local SQL server 2005 from "Server Explorer" but it is giving the error of "Remote Connectons" not allowed.

 

I am using "windows authentication" login.

 

My SQLExpress and SQLExpress browser are running from "SQL server configuration manager".

 

If i use a "App.Config" file to connect to database, the SQl connection can open and i can run the stored procedure.... but cannot access the database on my local machine.

 

Please help.

 

thanks for reply.

With regards,

Girish.

View Replies !
Visual Studio 2005 Unable To Connect To SQL Server Express 2005
Hi,
I have VS Pro 2005 and SQL Server Express 2005 installed on an XP Pro machine.  When using VS 2005, in the 'Server Explorer' window I can see and attach to two SQL Server databases that I have set-up.  But if I attempt to access the same databases from withn the 'Solution Explorer' window I get the following dialog box message,

"
Required Component Missing (Dialog box heading)

Connections to SQL Server Files (*.mdf) require SQL Server Express to function properly.  Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
"

I have uninstalled and then reinstalled both VS 2005 and SQL Server Express twice but it has helped.

I don't understand why I'm getting this error because all of the server configuration tools and connection utilities seem to work fine but VS say's that SQL Server Express is not installed.


Thanks,

CLN

P.S.
I had another application that required MSDE 2000A to be installed.  When I removed the other application I also removed MSDE 2000A and that's when the problem began.

View Replies !
Database Connectivity Using SQL Server And ASP.NET In Visual Studio
Dear all,I am having trouble connecting my asp.net pages to a sql server database.I have the database running in visual studio and i can query it using the sql pane.My problem is that i don't know where to put the ADO.net query string or what it should look like.Does visual studio provide a wizard for doing this?Also is it possible to use CSS to change ASP.NET tags, i.e. asp:LabelAny help would be appreciated.Cheers

View Replies !
How To Deploy SQL Server Database Project W/o Visual Studio.
i need a regex support in SQL 2005 server.
i've downloaded SQL regex support project from http://msdn.microsoft.com/msdnmag/issues/07/02/SQLRegex/default.aspx?loc=en.
but in order to enable regex support i needed to open VS 2005. compile the project and deploy it to SQL server. now i can use Regexp-s in SQL queries.
However this is not elegant way to deploy everytime SQL Database project via Visual Studio to every MS SQL server i want.
my question is : how can i deploy without using Visual Studio?

View Replies !
Adding Tables To SQL Server Database In Visual Studio?
Hi

I keep reading it's possible to add, amend ,etc. tables in visual studio but to do so I need access to the features that allow this.
I can connect to the database but I haven't been able to use any of these database features since they are "blanked" out.
Obviously, I can do all this at the server but ideally I would like to do it remotely.

Any suggestions?
Thanks in advance.

View Replies !
Created Database In Visual Studio 2005; How Do I Add It To SQL Server?
 

I have created a database in Visual Studio 2005 by adding a new "SQL Database" item to my project, and then designing the tables with Server Explorer.

How can I add this database to my local instance of SQL Server Express, and to my SQL Server 2000 database engine?

 

View Replies !
The Database Created Using Management Studio Cannot Be Connected To Visual Studio???help
 
 
I have created a database under management studio and i want it to be connected in visual studio but it failed
the error msgs said that the database can't be connected coz the database with same name exits but that is not true

View Replies !
How Can I Connect A Sql Server Database To Visual Basic 2005 Express
Hi, i am new to sql server and visual basic, i need to connect my sql server database to a new application i've developed in visual basic 2005 express. Can any one tell me the steps to do this. Many Thanks.

View Replies !
Can't Attach SQL Server 05 Database To Visual Studio 05 Project Because VS Is Asking For SQL Express Components
We recently started the process of upgrading our development platform to Visual Studio 2005 and SQL Server 2005 on our servers and SQL Devloper 2005 on our desktops. Yesterday I attempted to attach a SQL database I built to a test website project I have been building in VS. When I clicked the button to create the connection, I got this....
 
"Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251"
 
even though I can clearly see the reference to my database in the server explorer tab in VS. I initially installed the Express version that came with Visual Studio, but uninstalled it after I kept getting errors saying I couldn't create remote connections, even when I was only trying to connect to an instance I set up on my local workstation. I went back to SQL Server Developer 2005, because it worked in the past, and I was able to create and connect to my databases in my other projects.
 
Can someone tell me what is causing this issue? It's become a showstopper, because I can't finish my project, and I'm not thrilled with the idea of my developers having this problem when we roll Visual Studio out.
 
Thanks in advance....

View Replies !
Can't Connect .Net Application From Windows Server 2003 To Database Server (SQL Server 2000)
Hi,
I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error.
Here is the error:
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to 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 Pipes Provider, error: 40 - Could not open a connection to SQL Server)
 Here is the Environment:
App Server:
Windows Server 2003 Standard Edition
Inside Company's Firewall/ Network
Database Server:
Windows Server 2000 Advanced Edition
SQL Server 2000 SP4
Remote Connections to the Server is checked
Enable Protocols: Named Pipes & TCP/IP
TCP/IP Port: 1402 (I don't know why it isn't the default of 1433)
The db server is sitting out side the Company's firewall (don't ask me why). I can access it fine from inside the firewall on my XP box but not from windows server 2003. There is a web server outside the our network that also connects to the db server with no problem and that is running Windows Server 2003 Web Edition.
I can ping the db server from the app server using the IP address.
I tried using the IP address and the port 1402 in my connection string but that didn't work from any machine (XP and Server).
I imagine the issue is somehow related to the company's firewall but why would it only block Windows Server 2003 and not XP?
What do I tell the network admin to change?
Any help would be appreciated.
Thanks,
Oran
 

View Replies !
Package Fails When I Use ODBC Connection (Fails On SQL Server Agent, OK In Visual Studio)
I did a small package with only one ODBC connection (Merant 3.70 32-Bit Progess).  This package runs well in Visual Studio and fails when runs by SQL Server Agent.

Configuration:

SQL Server Agent on a 32Bit server. 

The ODBC connection configuration in available on System DSN on this server.

The user of Server Agent have full access (Admin).

Connect Manager Provider: ".Net ProvidersOdbc Data Provider"

SQL Server version: 9.0.3042

 

Error Message:

Executed as user: TEKCON cadmin. ...ion 9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  16:50:33  Error: 2007-06-11 16:50:33.62     Code: 0xC0047062     Source: Data Flow Task DataReader Source [1]     Description: System.Data.Odbc.OdbcException: ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented.  ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS  ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed.  ERROR [HYC00] [MERANT][ODBC PROGRESS driver]Optional feature not implemented.  ERROR [HY000] [MERANT][ODBC PROGRESS driver]msgOpen: unable to open message file: PROMSGS  ERROR [IM006] [MERANT][ODBC PROGRESS driver]Driver's SQLSetConnectAttr failed.     at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)     at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcCon...  The package execution fa...  The step failed.


I created a .bat file with this instruction and It's run well:

dtexec /f "C:Program FilesMicrosoft SQL Server90DTSPackagesIntegration Services Project estcom.dtsx"
pause

Why it's not running with SQL Server Agent???

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved