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

C#

 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 2:33
Ankit Aneja8-Jun-07 2:33 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 2:39
professionalManas Bhardwaj8-Jun-07 2:39 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 2:48
Ankit Aneja8-Jun-07 2:48 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 3:00
professionalManas Bhardwaj8-Jun-07 3:00 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 3:25
Ankit Aneja8-Jun-07 3:25 
GeneralRe: getting substring from a string Pin
Manas Bhardwaj8-Jun-07 3:28
professionalManas Bhardwaj8-Jun-07 3:28 
GeneralRe: getting substring from a string Pin
Ankit Aneja8-Jun-07 5:04
Ankit Aneja8-Jun-07 5:04 
QuestionInsert in Oracle Pin
Walaza8-Jun-07 0:26
Walaza8-Jun-07 0:26 
I am new in Oracle and now I'm am struggling to insert into the Oracle Database. The DB connection is fine. I keep getting the error "ORA-01036:illegal variable name/number". Would anyone please tell me what is wrong with the following code (C#):

// Insert user into Tester Table
public void InsertIntoTester(string fname,string lname,string usrname,string passwd,string address, string email, string tester_id)
{
Connection.Open();
string strSQL;
string insertValue= "'"+fname+"',"+"'"+lname+"',"+"'"+usrname+"',"+"'"+passwd+"',"+"'"+address+"',"+"'"+email+"',"+"'"+tester_id+"'";

strSQL = " INSERT INTO TESTER (FIRSTNAME, LASTNAME, USRNAME, PASSWD, ADDRESS, EMAIL, TESTERID) VALUES ("+insertValue+")";

//Initializing the command
InsertCommand.CommandType = System.Data.CommandType.Text;
InsertCommand.CommandText = strSQL;

//Clearing the parameters
InsertCommand.Parameters.Clear();

InsertCommand.Parameters.Add(":FIRSTNAME",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":LASTNAME",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":USRNAME",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":PASSWD",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":ADDRESS",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":EMAIL",System.Data.OracleClient.OracleType.VarChar,255);
InsertCommand.Parameters.Add(":TESTERID",System.Data.OracleClient.OracleType.VarChar,255);

InsertCommand.Parameters[0].Value = fname;
InsertCommand.Parameters[1].Value = lname;
InsertCommand.Parameters[2].Value = usrname;
InsertCommand.Parameters[3].Value = passwd;
InsertCommand.Parameters[4].Value = address;
InsertCommand.Parameters[5].Value = email;
InsertCommand.Parameters[6].Value = tester_id;

insertValue = strSQL;
InsertCommand.ExecuteNonQuery();
Connection.Close();
}

Please help..

Mvelo Walaza
Jnr Developer
Telkom SA

AnswerRe: Insert in Oracle Pin
Colin Angus Mackay8-Jun-07 0:36
Colin Angus Mackay8-Jun-07 0:36 
GeneralRe: Insert in Oracle Pin
Walaza8-Jun-07 0:46
Walaza8-Jun-07 0:46 
AnswerRe: Insert in Oracle Pin
Colin Angus Mackay8-Jun-07 0:53
Colin Angus Mackay8-Jun-07 0:53 
QuestionPassing Objects to threads.. Pin
Eytukan8-Jun-07 0:20
Eytukan8-Jun-07 0:20 
AnswerRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 0:24
professionalManas Bhardwaj8-Jun-07 0:24 
GeneralRe: Passing Objects to threads.. Pin
Colin Angus Mackay8-Jun-07 0:34
Colin Angus Mackay8-Jun-07 0:34 
GeneralRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 0:50
professionalManas Bhardwaj8-Jun-07 0:50 
GeneralRe: Passing Objects to threads.. Pin
Colin Angus Mackay8-Jun-07 0:55
Colin Angus Mackay8-Jun-07 0:55 
GeneralRe: Passing Objects to threads.. Pin
Manas Bhardwaj8-Jun-07 1:03
professionalManas Bhardwaj8-Jun-07 1:03 
GeneralRe: Passing Objects to threads.. Pin
AikinX8-Jun-07 0:55
AikinX8-Jun-07 0:55 
AnswerRe: Passing Objects to threads.. Pin
andre_swnpl8-Jun-07 1:37
andre_swnpl8-Jun-07 1:37 
Questionconvert this cyrillic output from the console app to unicode [modified] Pin
drweb868-Jun-07 0:00
drweb868-Jun-07 0:00 
AnswerRe: convert this cyrillic output from the console app to unicode Pin
PandemoniumPasha8-Jun-07 0:17
PandemoniumPasha8-Jun-07 0:17 
QuestionGEneric List Pin
Tauseef A7-Jun-07 23:55
Tauseef A7-Jun-07 23:55 
AnswerRe: GEneric List Pin
blackjack21508-Jun-07 0:07
blackjack21508-Jun-07 0:07 
AnswerRe: GEneric List Pin
Christian Graus8-Jun-07 0:32
protectorChristian Graus8-Jun-07 0:32 
AnswerRe: GEneric List Pin
leppie8-Jun-07 1:25
leppie8-Jun-07 1:25 

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.