Avatar of amillyard
amillyardFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

db connection string

I am wanting to use some of my sql routines from the asp.net site and utilise within a c#, WinForm.

did a cut and paste (as attached) -- but the compiler is complaining about

SqlDataSource FORTUNESQLDataSource = new SqlDataSource();
--> "Namespace or reference missing"

= ConfigurationManager
--> "the name 'ConfigurationManager' does not exist in this context"
protected void ChangeCaseWorker(int fortuneAgent_ID)
      {
          SqlDataSource FORTUNESQLDataSource = new SqlDataSource();
 
          FORTUNESQLDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["FORTUNEConnectionString"].ToString();
 
          System.Data.SqlClient.SqlCommand scCommand = new System.Data.SqlClient.SqlCommand();
          scCommand.CommandType = System.Data.CommandType.StoredProcedure;
          scCommand.CommandText = "BackOffice.UpdateCaseWorkerNewLead";

Open in new window

.NET ProgrammingMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
magicclaw
SOLUTION
Avatar of naspinski
naspinski
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of magicclaw
magicclaw
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo