Insert Random data from Textbox.
Hi,
I am using Oracle 8i as backend....
I have 1 combobox and 6 textboxes on a form, so if i select 1 in combobox then a single textbox is filled, 2 then 2 textboxes are filled with data, 3,4 and so on.....
Now i would like to know how to insert this sort of a random data from 6 textboxes(based on selection of digit in combobox) into the Table...?
Please help me......
Thank you....
Re: Insert Random data from Textbox.
There's no way we can answer that based on the information you've given us. We don't know what language you're coding in for a start, now do we know what the table looks like that you're inserting the data into.
Re: Insert Random data from Textbox.
Ok i ll make it simple...
a) 1 combobox ( Has list of digits from 1 to 6 loaded using AddItem method)
b) 6 textboxes
On Click event of Combobox i have coded like....
vb Code:
If cboSem_no.ListIndex = 0 Then
txtSem_name1.Text = "I-Semester"
Else
If cboSem_no.ListIndex = 1 Then
txtSem_name1.Text = "II-Semester"
end if
end if
and so on till 6 semesters......
So if 2 digit is selected from combobox then 2 textboxes will be loaded( names of semester)....
The problem is about to use the SQL INSERT INTO (Oracle8i) statement without inserting NULL values from the remaining textboxes(if No. of Semesters selected are less than 6).
Thank you....
Re: Insert Random data from Textbox.
If this is related to your other thread aqnd order of insert is important then consider creating a package with subprograms that will do the insert. Overload subprogram to accept varying number of parameters (each in turn will just call subprogram with less number of parameters). Something like.
Code:
pkg.sample (x, y, z)
as
begin
/* do insert of x and y */
pkg.sample (x, y);
/* then do insert of z */
pkg.sample (z);
end
Otherwise, if you going to do it at the front-end you will have to define the queries there since data needs to be pivoted (or rather unpivoted) before insert.
Re: Insert Random data from Textbox.
Thanks leinad.....I ll try to implement your idea......