Click here to Skip to main content
15,889,403 members
Home / Discussions / Database
   

Database

 
QuestionSqlserver error of date difference Pin
snehasish28-Nov-08 2:25
snehasish28-Nov-08 2:25 
AnswerRe: Sqlserver error of date difference Pin
Wendelius28-Nov-08 3:43
mentorWendelius28-Nov-08 3:43 
GeneralRe: Sqlserver error of date difference Pin
snehasish28-Nov-08 18:25
snehasish28-Nov-08 18:25 
GeneralRe: Sqlserver error of date difference Pin
Wendelius28-Nov-08 20:40
mentorWendelius28-Nov-08 20:40 
QuestionVerify my understanding Pin
Syed Mehroz Alam27-Nov-08 22:18
Syed Mehroz Alam27-Nov-08 22:18 
AnswerRe: Verify my understanding Pin
Steve Westbrook1-Dec-08 5:52
Steve Westbrook1-Dec-08 5:52 
GeneralRe: Verify my understanding Pin
Ben Fair3-Dec-08 4:08
Ben Fair3-Dec-08 4:08 
QuestionOleDb? Pin
dec8227-Nov-08 15:46
dec8227-Nov-08 15:46 
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, "");
}

}
AnswerRe: OleDb? Pin
Jerry Hammond27-Nov-08 15:55
Jerry Hammond27-Nov-08 15:55 
GeneralRe: OleDb? Pin
dec8227-Nov-08 17:55
dec8227-Nov-08 17:55 
AnswerRe: OleDb? Pin
Wendelius28-Nov-08 4:19
mentorWendelius28-Nov-08 4:19 
GeneralXQuery Issue Pin
Brady Kelly27-Nov-08 7:08
Brady Kelly27-Nov-08 7:08 
GeneralRe: XQuery Issue Pin
Wendelius27-Nov-08 7:31
mentorWendelius27-Nov-08 7:31 
GeneralRe: XQuery Issue Pin
Brady Kelly27-Nov-08 7:39
Brady Kelly27-Nov-08 7:39 
GeneralRe: XQuery Issue Pin
Wendelius27-Nov-08 7:48
mentorWendelius27-Nov-08 7:48 
GeneralRe: XQuery Issue Pin
Brady Kelly27-Nov-08 7:56
Brady Kelly27-Nov-08 7:56 
Questionimport from excel Pin
tkoletsis27-Nov-08 5:15
tkoletsis27-Nov-08 5:15 
AnswerRe: import from excel Pin
Wendelius27-Nov-08 5:56
mentorWendelius27-Nov-08 5:56 
QuestionIssue with Reporting services Pin
Sandeep Akhare27-Nov-08 4:41
Sandeep Akhare27-Nov-08 4:41 
AnswerRe: Issue with Reporting services [modified] Pin
Jerry Hammond27-Nov-08 15:49
Jerry Hammond27-Nov-08 15:49 
GeneralRe: Issue with Reporting services Pin
Sandeep Akhare27-Nov-08 15:56
Sandeep Akhare27-Nov-08 15:56 
GeneralRe: Issue with Reporting services Pin
Jerry Hammond27-Nov-08 17:50
Jerry Hammond27-Nov-08 17:50 
GeneralRe: Issue with Reporting services Pin
Sandeep Akhare28-Nov-08 8:49
Sandeep Akhare28-Nov-08 8:49 
Questiondata versioning in CMS Pin
m-khansari26-Nov-08 21:41
m-khansari26-Nov-08 21:41 
AnswerRe: data versioning in CMS Pin
Ashfield26-Nov-08 21:46
Ashfield26-Nov-08 21:46 

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.