Click here to Skip to main content
15,916,280 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to search and dispaly the file path for csc.exe? URGENT plz Hep........ Pin
Luc Pattyn26-Nov-08 18:00
sitebuilderLuc Pattyn26-Nov-08 18:00 
GeneralRe: How to search and dispaly the file path for csc.exe? URGENT plz Hep........ Pin
tonyjsebastian126-Nov-08 18:18
tonyjsebastian126-Nov-08 18:18 
GeneralRe: How to search and dispaly the file path for csc.exe? URGENT plz Hep........ Pin
Luc Pattyn26-Nov-08 19:11
sitebuilderLuc Pattyn26-Nov-08 19:11 
Questionfetching the byte[] value from hashtable and display as image Pin
renuga529826-Nov-08 17:30
renuga529826-Nov-08 17:30 
AnswerRe: fetching the byte[] value from hashtable and display as image Pin
Christian Graus26-Nov-08 17:54
protectorChristian Graus26-Nov-08 17:54 
GeneralRe: fetching the byte[] value from hashtable and display as image Pin
renuga529826-Nov-08 18:48
renuga529826-Nov-08 18:48 
AnswerRe: fetching the byte[] value from hashtable and display as image Pin
Guffa26-Nov-08 20:17
Guffa26-Nov-08 20:17 
QuestionclsADONET? Pin
dec8226-Nov-08 15:27
dec8226-Nov-08 15:27 
Hi, i have error" Data type mismatch in criteria expression" when execute : clsADONET.setConnCommand_Close(sCommand) . Can explain for me what's wrong? here is the code. thanks




public void Update()
{
try
{
string cmd;
string field;
string parameter;
field = "Site,Model”;
parameter = "@Site,@model”;
cmd = "INSERT INTO Run(" + field + ") values (" + parameter + ")";
clsADONET.setConnCommand_Open(sCommand);
sCommand.CommandText = cmd;
sCommand.Parameters.Add("@Site", OleDbType.VarChar, 20);
sCommand.Parameters.Add("@Model", OleDbType.VarChar, 20);
sCommand.Parameters["@Site"].Value = CS.site;
sCommand.Parameters["@Model"].Value = CS.DUTSelected.ToString();
clsADONET.setConnCommand_Close(sCommand);
}
catch(Exception e)
{
MessageBox.Show(e.Message);
return;
}

}

class clsADONET
{

public static OleDbConnection sConnection = new OleDbConnection();
public static OleDbCommand sCommand = new OleDbCommand();
public static OleDbDataAdapter sAdapter = new OleDbDataAdapter();

public static void setConnCommand_Open(OleDbCommand sCommand)
{
setConnection(CommunicationSettings .DatabaseonServer);

sConnection.Open();
sCommand.Connection = sConnection;
}

public static void setConnCommand_Close(OleDbCommand sCommand)
{
try
{

sCommand.ExecuteNonQuery();
sCommand.Parameters.Clear();
sCommand.Connection.Close();
sConnection.Close();
}
catch (Exception e)
{
clsLog.LogEvent("Error", "", "Module:setConnCommand_Close(clsADONET.cs) ", e.Message, CommunicationSettings.EventNo);
}
}
public static void setConnection(string dataBaseLocation)
{
if (sConnection.State == ConnectionState.Open) sConnection.Close();
sConnection.ConnectionString = setConnectionString(dataBaseLocation, "");
}

}
QuestionEngineering Design Pin
viciouskinid26-Nov-08 13:05
viciouskinid26-Nov-08 13:05 
AnswerRe: Engineering Design Pin
Christian Graus26-Nov-08 13:11
protectorChristian Graus26-Nov-08 13:11 
GeneralRe: Engineering Design Pin
PIEBALDconsult26-Nov-08 13:35
mvePIEBALDconsult26-Nov-08 13:35 
GeneralRe: Engineering Design Pin
Christian Graus26-Nov-08 13:35
protectorChristian Graus26-Nov-08 13:35 
GeneralRe: Engineering Design Pin
Mycroft Holmes26-Nov-08 16:11
professionalMycroft Holmes26-Nov-08 16:11 
GeneralRe: Engineering Design Pin
Luc Pattyn26-Nov-08 16:56
sitebuilderLuc Pattyn26-Nov-08 16:56 
GeneralRe: Engineering Design Pin
Mycroft Holmes26-Nov-08 17:10
professionalMycroft Holmes26-Nov-08 17:10 
GeneralRe: Engineering Design Pin
Luc Pattyn26-Nov-08 17:26
sitebuilderLuc Pattyn26-Nov-08 17:26 
GeneralRe: Engineering Design Pin
viciouskinid26-Nov-08 18:08
viciouskinid26-Nov-08 18:08 
QuestionSave and Save As for this xml/c# code Pin
Chris Kentlea26-Nov-08 8:59
Chris Kentlea26-Nov-08 8:59 
AnswerRe: Save and Save As for this xml/c# code [modified] Pin
Pedram Behroozi26-Nov-08 9:19
Pedram Behroozi26-Nov-08 9:19 
GeneralRe: Save and Save As for this xml/c# code Pin
Chris Kentlea26-Nov-08 9:34
Chris Kentlea26-Nov-08 9:34 
GeneralRe: Save and Save As for this xml/c# code Pin
Luc Pattyn26-Nov-08 9:43
sitebuilderLuc Pattyn26-Nov-08 9:43 
GeneralRe: Save and Save As for this xml/c# code Pin
Chris Kentlea26-Nov-08 9:45
Chris Kentlea26-Nov-08 9:45 
GeneralRe: Save and Save As for this xml/c# code Pin
Pedram Behroozi26-Nov-08 9:48
Pedram Behroozi26-Nov-08 9:48 
AnswerRe: Save and Save As for this xml/c# code Pin
Christian Graus26-Nov-08 10:01
protectorChristian Graus26-Nov-08 10:01 
QuestionMultiThreading, went back to basics.. Pin
EliottA26-Nov-08 7:56
EliottA26-Nov-08 7:56 

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.