Click here to Skip to main content
15,918,404 members
Home / Discussions / C#
   

C#

 
GeneralRe: datagrid invoke and tablestyles Pin
xrado23-Sep-05 7:34
xrado23-Sep-05 7:34 
GeneralRe: datagrid invoke and tablestyles Pin
sreejith ss nair25-Sep-05 17:31
sreejith ss nair25-Sep-05 17:31 
GeneralRe: datagrid invoke and tablestyles Pin
xrado25-Sep-05 20:50
xrado25-Sep-05 20:50 
Questioni need help to fix the histogram.plz Pin
davidcooler22-Sep-05 21:19
davidcooler22-Sep-05 21:19 
AnswerRe: i need help to fix the histogram.plz Pin
Stefan Troschuetz22-Sep-05 21:51
Stefan Troschuetz22-Sep-05 21:51 
QuestionEDITING AND UPDATING DATA IN DATAGRID Pin
EKJDBA22-Sep-05 21:12
EKJDBA22-Sep-05 21:12 
AnswerRe: EDITING AND UPDATING DATA IN DATAGRID Pin
enjoycrack22-Sep-05 21:24
enjoycrack22-Sep-05 21:24 
Questioncreating and deleting database in C# ASP.net Pin
EKJDBA22-Sep-05 20:08
EKJDBA22-Sep-05 20:08 
i made the following stored procedure
CREATE procedure databasecreation (@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'create database '+@a+ ''
EXEC (@strquery)

ALTER procedure databasedeletion(@a varchar(20))
AS
declare @strquery varchar(1000)
SET @strquery = 'DROP database '+@a+ ''
EXEC (@strquery)

when executing it in front end C#
code;-
SqlConnection c = new SqlConnection("server=dbasvr03;uid=sa;pwd=sa;database=banking");
private void button1_Click(object sender, System.EventArgs e)
{
String databasename;
databasename =textBox1.Text;
c.Open();
SqlDataAdapter MyDataAdapter= new SqlDataAdapter("databasecreation ", c); MyDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure;
MyDataAdapter.SelectCommand.Parameters.Add(new SqlParameter("@a",
SqlDbType.VarChar,20));
MyDataAdapter.SelectCommand.Parameters["@a"].Value = databasename;
MyDataAdapter.SelectCommand.ExecuteNonQuery();
Console.WriteLine("DATABASE CREATED");
c.Close();
}
AT EXECUTION THE FOLLOWING ERROR COMES-
databasecreation error: identifier 'databasecreation' out of scope

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll




PLEASE GIVE A SOLUTION

-- modified at 2:57 Friday 23rd September, 2005
AnswerRe: creating and deleting database in C# ASP.net Pin
enjoycrack22-Sep-05 20:27
enjoycrack22-Sep-05 20:27 
QuestionCapture Ctrl+Alt+Del Event Pin
krishnakumar7522-Sep-05 19:37
krishnakumar7522-Sep-05 19:37 
AnswerRe: Capture Ctrl+Alt+Del Event Pin
Dave Kreskowiak23-Sep-05 2:28
mveDave Kreskowiak23-Sep-05 2:28 
GeneralRe: Capture Ctrl+Alt+Del Event Pin
Tomas Brennan24-Sep-05 4:48
Tomas Brennan24-Sep-05 4:48 
GeneralRe: Capture Ctrl+Alt+Del Event Pin
Dave Kreskowiak25-Sep-05 1:39
mveDave Kreskowiak25-Sep-05 1:39 
Questionchar [ ] to float? Pin
levi's22-Sep-05 19:05
levi's22-Sep-05 19:05 
AnswerRe: char [ ] to float? Pin
enjoycrack22-Sep-05 20:32
enjoycrack22-Sep-05 20:32 
Questionhow to get variable name. (for lmoelleb) Pin
ab.hamad22-Sep-05 18:56
ab.hamad22-Sep-05 18:56 
Questionhow to install Pin
Rajganga22-Sep-05 18:43
Rajganga22-Sep-05 18:43 
AnswerRe: how to install Pin
sreejith ss nair22-Sep-05 19:02
sreejith ss nair22-Sep-05 19:02 
AnswerRe: how to install Pin
23-Sep-05 8:33
suss23-Sep-05 8:33 
Questionsimple webform validation not able to do Pin
jyothi_pradeep_satyam_corp22-Sep-05 18:12
jyothi_pradeep_satyam_corp22-Sep-05 18:12 
AnswerRe: simple webform validation not able to do Pin
sreejith ss nair22-Sep-05 18:54
sreejith ss nair22-Sep-05 18:54 
GeneralRe: simple webform validation not able to do Pin
jyothi_pradeep_satyam_corp23-Sep-05 18:02
jyothi_pradeep_satyam_corp23-Sep-05 18:02 
GeneralRe: simple webform validation not able to do Pin
jyothi_pradeep_satyam_corp23-Sep-05 18:04
jyothi_pradeep_satyam_corp23-Sep-05 18:04 
GeneralRe: simple webform validation not able to do Pin
jyothi_pradeep_satyam_corp23-Sep-05 18:06
jyothi_pradeep_satyam_corp23-Sep-05 18:06 
QuestionWay to access class member Pin
Libra22-Sep-05 17:38
Libra22-Sep-05 17:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.