Having problems inserting parameters from C#/.NET into Oracle database

Dear fellow developers:

I am having problems inserting data into an Oracle database using parameters using C#/.NET within a program called "Visual Web Ripper".  I've been told that Oracle identifies parameters by using ":", which is precisely what I've done in my code (attached below).  Because there are several rows I am inserting into this table, I created a variable (i) that I am trying to increment within a while loop and then inserting it along with the data into the table.  When I run this code, I get the following error:

ORA-01722: invalid number

If I simply omit the reference to (i), and replace it with a static value so that my line reads:

args.Database.SetSql("insert into OwnerTender (SYSID, OWNID, TNDRNUM,SHORTDESC) values ('17', '66666666', ':TenderID', ':Description')");

my code literally inserts ":TenderID", and ":Description" into the columns, and never goes into my while loop to iterate through the data that I have extracted, nor inserts the data into my table.  

Can anyone see where I am going wrong?

Thanks in advance to all who reply.
public static bool ExportData(WrExportArguments args)
			int i = 0;
			//First we set the SQL we'll use to insert data into the database table.      
			//The Database connection has already been set by defining a shared script       
			//database. Visual Web Ripper will automatically open and close the       
			//database connection.      			
		//	args.Database.SetSql("insert into OwnerTender (SYSID, OWNID, TNDRNUM,SHORTDESC) values ('1', '88888888', '3333', '33333')");   
			args.Database.SetSql("insert into OwnerTender (SYSID, OWNID, TNDRNUM,SHORTDESC) values (':i', '66666666', ':TenderID', ':Description')");
			//Loop htough all the export tables
			foreach (WrExportTableDefinition table in args.ExportData.TablesDefinitions.Tables)
				//Open a data reader for the current table
				WrExportTableReader reader = args.ExportData.GetTableReader(table.TableName);
					//Loop though all rows in the current data table and write them to the target database.
					while (reader.Read())
						args.Database.SetParameterIntValue("SYSID", i++);

			return true;
		catch (Exception exp)
			return false;

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remove the quotes from the bind variables

(:i, '66666666', :TenderID, :Description)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fsyedAuthor Commented:
Thanks so much for your prompt reply.  I had no idea I was this stupid!  :-)

Points well deserved!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.