|
Weird. DESC is standard SQL, it's not a command on it's own AFAIK. Did you try google ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
As Far As I Know
DESC is not a SQL command, it's a modifier.
select * from tbl order by Id
is the same as
select * from tbl order by Id ASC
and
select * from tbl order by Id DESC
makes the order descending.
What are you trying to do ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, but I dont mean descending sorting by DESC, I mean DESCribe
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
|
Hey, thanks mate, that was some useful link
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hi Christian, I found something but still need an example
SELECT
column_name "Name",
nullable "Null?",
concat(concat(concat(data_type,'('),data_length),')') "Type"
FROM user_tab_columns
WHERE table_name='TABLE_NAME_TO_DESCRIBE';
ps. The SQL DDL is not a valid SELECT statement so you would need to use an alternative.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
OK - now you just need to know how to run a SQL command against an oracle DB.
ADO.NET works the same as it does for SQL Server, you just build your SQL and execute it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: you just need to know how to run a SQL command against an oracle DB
Ok,
Christian Graus wrote: just build your SQL and execute it.
And.. .. I mean once I do it, how do I read the output??
Maybe by using the ExecuteReader() .. Ok, Dont worry, I'll handle it, Thanks Christian
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
string strDesc = @"SELECT concat(column_name,',') ""Name"" FROM user_tab_columns WHERE table_name='TEST'";
OracleCommand oc = new OracleCommand(strDesc, con);
adap = new OracleDataAdapter(oc);
OracleDataReader oraDataReader = oc.ExecuteReader();
string strTemp = String.Empty;
while (oraDataReader.Read())
strTemp += oraDataReader.GetString(0);
strTemp = strTemp.Substring(0, strTemp.Length - 1);
MessageBox.Show(strTemp);
Thanks to you Christian
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
modified on Monday, April 14, 2008 4:16 AM
|
|
|
|
|
Awesome - glad you got it working.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have a DataGridView which has a column of type double. How can i set that this column cells to be validated without reference to the decimal separator("," or ".")? Because the cell is validated only when the decimal separator in the value is identical to which is set in the regional settings.
Thanks.
|
|
|
|
|
I am page scraping to pull anywhere from 50,000 to 150,000 single string items that I would like to enter into my database. I have a very simple interface with a label, progress bar, and a button.
When I click the button I gets the information, and starts two threads, one enters data into the database, and the other updates the progress bar on how many have been entered verse how many need to be.
Everything works well, but it works very slow. I am following certain rules like leaving the connection open. I am also not using any Thread.Sleeps...
Any suggestions?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote: I am also not using any Thread.Sleeps...
There is most likely your problem.
Unless you have multiple CPUs or a multiple core CPU, only one thread at a time can run. Your thread that updates the progbress bar will update the progress bar once, then it will wait it's entire time slot for another change that will not happen, as it's blocking the thread that would do the change.
When there is nothing for the thread to do, you should do a Thread.Sleep(0) to give up the rest of the time slot so that another thead can use the CPU time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
That helped a ton. I moved the wait up to 1000 milliseconds and it was about the same. My old SQL Server must be the slow down, it seems like it goes fast for a while and then really bogs down, sounds like a SQL I/O issue.
Thanks.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi,
My form contains several controls like textbox, labels, buttons, panels etc..
To access these controls I used the following for loop.
foreach (Control ctrl in this.Controls)
{
}
Panel contains 36 checkbox controls. I'm unable to get checkbox controls in the for loop becoz those are in panel..
How to access and modify the properties of checkbox controls, which are in Panel. Thanks in advance..
|
|
|
|
|
The loop you are running will only get the controls in whatever Container this is (Usually a form, and looks like it is in your case). Run that same loop on the panel and you will get all the controls inside of it.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thanks for your prompt reply. Can you explain what does the following sentence mean?
the best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Reread my post, it got cut up all weird for some reason, I fixed it.
That is my signature. It means the only way to make a Mac is to drop it (preferably off a very tall building).
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
instead of this.Controls, loop through the controls in panel.Controls.
Or better yet, if they are dynamically created by you, when putting the checkbox in the panel, put them in a List/ArrayList so that they are easier to be referenced.
|
|
|
|
|
I am using the bitblt() function for printing a bitmap with c#. But the printing quality I am getting in this case is not satisfactory at all. Actually, the type of bitmaps that the 'BitBlt()' function requires are normally in the format of the display driver rather than the printer driver. So I am thinking of using a DIB rather than DDB and for doing this may be StretchDIBits() function can be used.
Please help me with some code sample on how to use the StretchDIBits() function in C#
Thanks in advance
Kamrul Hasan
|
|
|
|
|
You can use StretchDIBits if you want, using P/invoke. However, did you set the stretch blit mode of the graphics object you're using and see if that helped ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Is it possible to backup and restore a MySql Database using C#?
How? Any suggestions?
|
|
|
|
|
Yes, it's possible: Get all tables, foreach table, get all columns and then create the script that will add this table into a Mysql database
|
|
|
|
|
This is somewhat confusing. Could you give me more specifics on what you're suggesting? Are you saying that I backup the database by placing it on another database?
I was thinking more around the grounds of backing up my database on a *.sql file and restoring it from a *.sql file using C#.
|
|
|
|