Click here to Skip to main content
15,897,032 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help file Pin
Mairaaj Khan27-Dec-06 19:16
professionalMairaaj Khan27-Dec-06 19:16 
Questionpassing values between 2 Forms Pin
Moham'd27-Dec-06 11:34
Moham'd27-Dec-06 11:34 
AnswerRe: passing values between 2 Forms Pin
Colin Angus Mackay27-Dec-06 11:59
Colin Angus Mackay27-Dec-06 11:59 
GeneralRe: passing values between 2 Forms Pin
Paul Conrad27-Dec-06 18:34
professionalPaul Conrad27-Dec-06 18:34 
GeneralRe: passing values between 2 Forms Pin
Moham'd30-Dec-06 3:15
Moham'd30-Dec-06 3:15 
QuestionMdiForm Pin
md_refay27-Dec-06 11:15
md_refay27-Dec-06 11:15 
AnswerRe: MdiForm Pin
Mairaaj Khan28-Dec-06 1:12
professionalMairaaj Khan28-Dec-06 1:12 
Questionfrom vb.net to C# Pin
microuser_200027-Dec-06 11:09
microuser_200027-Dec-06 11:09 
hellow to all ..
i have a vb.net code that use ADO.NET
i need to make it work on C# ..
but when i write it down i got two erros ...
i don't know why ! it is ado.net code it have to work in anylanguage .

i got the error where the arrows are ..
thxx to anyhelp ..

{
string SQLContract,SQLContractPay;
int ContractIndx;
ClsInfo Assist_Var = new ClsInfo();



SQLContract = "INSERT Contract( " +
"ClientNum,ContractType,BDate,EDate," +
"UDate,ContratOption,PropertyNum,"+
"HierMeters,MeterPrice,Remarks)" +
"VALUES( " +
txt_Client_Name.Text + "," +
Assist_Var.PrepareStr("B") + "," +
Assist_Var.PrepareStr(dtFromDate.Text) + "," +
Assist_Var.PrepareStr(dtToDate.Text) + "," +
Assist_Var.PrepareStr(dtChange.Text) + "," +
Assist_Var.Val(txtYears.Text) + "," +
Assist_Var.Val(txtPropertyID.Text) + "," +
Assist_Var.Val(txtMeters.Text) + "," +
Assist_Var.Val(txtMeterPrice.Text) + "," +
Assist_Var.PrepareStr(txtRemarks.Text) + ");" +
"SELECT @Indx = @@IDENTITY" ;


OleDbConnection OleDbConn = new OleDbConnection(Assist_Var.SQLConnection());
OleDbConn.Open();

OleDbCommand OleDbCommand = new OleDbCommand();

OleDbCommand.CommandText = SQLContract;
OleDbCommand.CommandType = CommandType.Text;
OleDbCommand.Connection = OleDbConn;
OleDbParameter MyPara = new OleDbParameter();
------->>>> 'MyPara = new OleDbParameter("@Indx",SqlDbType.Int, 4);
MyPara.Direction = ParameterDirection.Output;
OleDbCommand.Parameters.Add(MyPara);

try
{

OleDbCommand.ExecuteNonQuery();
---->>>> 'ContractIndx = OleDbCommand.Parameters("@Indx").Value();

}

catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

AnswerRe: from vb.net to C# Pin
Colin Angus Mackay27-Dec-06 12:08
Colin Angus Mackay27-Dec-06 12:08 
GeneralRe: from vb.net to C# Pin
microuser_200030-Dec-06 4:19
microuser_200030-Dec-06 4:19 
GeneralRe: from vb.net to C# Pin
Colin Angus Mackay30-Dec-06 7:22
Colin Angus Mackay30-Dec-06 7:22 
QuestionEncrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 9:26
Cormac M Redmond27-Dec-06 9:26 
AnswerRe: Encrypting files & usernames/passwords - What are the normal practises? [modified] Pin
Judah Gabriel Himango27-Dec-06 10:09
sponsorJudah Gabriel Himango27-Dec-06 10:09 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Dan Neely27-Dec-06 10:41
Dan Neely27-Dec-06 10:41 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 11:15
sponsorJudah Gabriel Himango27-Dec-06 11:15 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 11:24
Cormac M Redmond27-Dec-06 11:24 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 16:15
sponsorJudah Gabriel Himango27-Dec-06 16:15 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 18:30
Cormac M Redmond27-Dec-06 18:30 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 11:23
Cormac M Redmond27-Dec-06 11:23 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Judah Gabriel Himango27-Dec-06 16:27
sponsorJudah Gabriel Himango27-Dec-06 16:27 
GeneralRe: Encrypting files & usernames/passwords - What are the normal practises? Pin
Cormac M Redmond27-Dec-06 18:28
Cormac M Redmond27-Dec-06 18:28 
QuestionHow to persist collection entries added or removed by the CollectionEditor, when returning from a CollectionEditor????? Pin
Dinesh Jayadevan27-Dec-06 9:21
Dinesh Jayadevan27-Dec-06 9:21 
QuestionC# and Excel 2000 [modified] Pin
73Zeppelin27-Dec-06 8:08
73Zeppelin27-Dec-06 8:08 
AnswerRe: C# and Excel 2000 Pin
Judah Gabriel Himango27-Dec-06 10:11
sponsorJudah Gabriel Himango27-Dec-06 10:11 
GeneralRe: C# and Excel 2000 Pin
73Zeppelin27-Dec-06 10:15
73Zeppelin27-Dec-06 10:15 

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.