Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
QuestionCrystal Report: indentation for text field only Pin
levik200614-Feb-06 19:45
levik200614-Feb-06 19:45 
AnswerCrystal Report: indentation for text field only Pin
levik200620-Feb-06 23:06
levik200620-Feb-06 23:06 
Questiongraphics Pin
Vineet Rajan14-Feb-06 19:20
Vineet Rajan14-Feb-06 19:20 
AnswerRe: graphics Pin
CWIZO14-Feb-06 20:57
CWIZO14-Feb-06 20:57 
Questionrunning on slow computers --> UI refreshes too slowly Pin
2hdass14-Feb-06 19:15
2hdass14-Feb-06 19:15 
AnswerRe: running on slow computers --> UI refreshes too slowly Pin
CWIZO14-Feb-06 20:59
CWIZO14-Feb-06 20:59 
QuestionPrinting Data using C# Pin
vkishan14-Feb-06 18:48
vkishan14-Feb-06 18:48 
Questionexcecuting file containin sql script of a database Pin
deep714-Feb-06 18:18
deep714-Feb-06 18:18 
how to execute a text file, which contains sql script of a database.
I need to execute this file in my code.. i tried this function:
private void ExecSqlFileProcess(String fileName)
{
if (! File.Exists(fileName))
{
MessageBox.Show ("Specified .SQL File Not Found.","Net Fare Database Upgrade Tool",MessageBoxButtons.OK);
return;
}
using (StreamReader sr = new StreamReader(fileName))
{
String line,line1;
String sqlLine= "" ;

while ((line = sr.ReadLine()) != null)
{
line1 = line.Trim();
int compareResult = String.Compare(line1, "GO", true, CultureInfo.InvariantCulture);

if(compareResult != 0)
sqlLine += line + Environment.NewLine ;
//sqlLine += line + c.ToString() ;
else
{
if(sqlLine != "")
{
try
{
int i = SqlHelper.ExecuteNonQuery(connectionString,CommandType.Text,"USE "+DatabaseName+" "+sqlLine);
}
catch(Exception Ex)
{
MessageBox.Show (Ex.Message.ToString(),"Net Fare Database Upgrade Tool",MessageBoxButtons.OK ,MessageBoxIcon.Error );;
sqlLine = "";
}
}
sqlLine = "";
}
}//While
}//Using
}

but i got the following errors for all stored procedure scripts..but it dropped the stored procedure..it only did not create it..following error comes:
'Create Procedure' must be first statement in the query batch.
Must declare variable @IATACodeName, @IATADescription..etc..
Question[Message Deleted] Pin
JC Carmo14-Feb-06 17:22
JC Carmo14-Feb-06 17:22 
AnswerRe: C# 2005 - Parent and Child ComboBoxes in Datagrid Control Pin
Expert Coming14-Feb-06 17:50
Expert Coming14-Feb-06 17:50 
QuestionConsole to GUI Change: RegEx Error Pin
Expert Coming14-Feb-06 17:18
Expert Coming14-Feb-06 17:18 
AnswerRe: Console to GUI Change: RegEx Error Pin
DigitalKing14-Feb-06 20:16
DigitalKing14-Feb-06 20:16 
GeneralRe: Console to GUI Change: RegEx Error Pin
Expert Coming15-Feb-06 10:48
Expert Coming15-Feb-06 10:48 
AnswerRe: Console to GUI Change: RegEx Error Pin
DigitalKing15-Feb-06 13:40
DigitalKing15-Feb-06 13:40 
GeneralRe: Console to GUI Change: RegEx Error Pin
Expert Coming15-Feb-06 14:05
Expert Coming15-Feb-06 14:05 
QuestionDirectDraw surfaces without DirectX Pin
Chris Boden14-Feb-06 16:42
Chris Boden14-Feb-06 16:42 
AnswerRe: DirectDraw surfaces without DirectX Pin
CWIZO14-Feb-06 21:02
CWIZO14-Feb-06 21:02 
QuestionProblem With ToolBars Pin
Tyrus18214-Feb-06 16:26
Tyrus18214-Feb-06 16:26 
AnswerRe: Problem With ToolBars Pin
Joshua Quick14-Feb-06 17:34
Joshua Quick14-Feb-06 17:34 
QuestionTest a DIB for percentage of black pixels Pin
davidhart14-Feb-06 15:06
davidhart14-Feb-06 15:06 
Questionxml doc consumption with multiple namespaces -- corrected Pin
spin vector14-Feb-06 12:06
spin vector14-Feb-06 12:06 
AnswerRe: xml doc consumption with multiple namespaces Pin
Curtis Schlak.14-Feb-06 15:23
Curtis Schlak.14-Feb-06 15:23 
GeneralRe: xml doc consumption with multiple namespaces Pin
spin vector15-Feb-06 1:24
spin vector15-Feb-06 1:24 
GeneralRe: xml doc consumption with multiple namespaces Pin
Curtis Schlak.15-Feb-06 3:33
Curtis Schlak.15-Feb-06 3:33 
GeneralRe: xml doc consumption with multiple namespaces Pin
spin vector15-Feb-06 10:36
spin vector15-Feb-06 10:36 

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.