|
Navaneeth is right, the language used comes from the locale settings for the PC.
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 to export data from a given select in a database from one server to a table from another server.If the table where i have to insert data doesn't exist, i have to create it.Since i can't use select into which also creates the table(servers are not linked so select into won't work), i have to generate script manually and i'm using the column types from the DataTable filled using a SQlAdapter to do this.My problem is how do i map System.Type in the CREATE script.I tried using DBType, but that also returns strings like Int32, which i can't use.If let's say, i change Int32 to int will work, but doing this for every Type would mean a lot of work.
Any ideas on how to do the mapping, or is there a different approach to do this?
I could use select..into..where 1=0 on the source database to create an empty temporary table, use SMO to obtain the script and delete the temporary table, but i think it has risks so i'm trying to avoid it.
Thank you
modified on Monday, April 14, 2008 7:08 AM
|
|
|
|
|
hi..
How to read and close an image from a file.I used
Image img=Image.FromFile(val) code to read image from file....But once i read that one ...I wont be able to delete it or overwrite it bcz my my current project process is using that one...Also I used bmp.Save() method to write image into file.Is there anyway to overwrite a file using bmp.Save() method ?.It will be very helpful if explains with code..
modified on Monday, April 14, 2008 3:58 AM
|
|
|
|
|
Please don't make your post bold. It's jut annoying.
You need to copy the image, close the original, and save from the copy. This is a bug in .NET.
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 )
|
|
|
|
|
Denver Thomas wrote: Image img=Image.FromFile(val)
I think Image.FromFile() won't release the file handle immediately. You may try to read the files from a stream and dispose stream after image loaded. It would be something like
Image img = null;
using (FileStream fs = new FileStream("imagePath", FileMode.Open))
{
img = Image.FromStream(fs);
}
|
|
|
|
|
hi friends....
thanks for your reply.I tried both the methods..but failed.
When i tried reading from stream...it is showing out of memmory exception.
I tried another method like take a clone of the original bitmap and dispose that one...but still that process is not releasing that image. Is there any other way to do that ?
|
|
|
|
|
Denver Thomas wrote: it is showing out of memmory exception.
What is your image size ? Is it too big ?
|
|
|
|
|
yes yes....it is 600*624 in size...any other way to do that ?
|
|
|
|
|
Denver Thomas wrote: 600*624 in size
This don't make any problem. I was asking for the file size.
|
|
|
|
|
Hi,
Image class returns some weird exceptions, OutOfMemory typically means image format not
supported, or "The file does not have a valid image format" (i.e. some data error in file).
It is not indicating a memory problem!
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi,
choose one implementation, show us the code and give us exact symptoms. Then we can
help and figure out what is going wrong.
BTW: is the image file you want to delete a recent file, i.e. did your app create it
as well, or is it a pre-existing image file?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
oh thank u friend....i didnt tried "embeddedcolormanagement" parameter of fromstream Method.... I think it will work ...
|
|
|
|
|
I have a settings form for my application (ex: default start time for a task is 8:00 AM, or background color of the app). Where do you think it's better to store these info?
1. app config
2. setting table in database
3. registry
|
|
|
|
|
|
It depends on your app in some ways. If you store in a database your settings are dependant on accessing the database - if its unavailable what would the impact be. The registry is a bad idea, that went out with the ark. Too many registry entries slow the computer, which hive do you put them in, maintenance is a pain etc.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Yeah, it depends on how you want them to work.
If they are stored in a database, then the user can use his settings regardless of which computer he is at. (Some of my software is used in a call-center where a user may not get the same workstation each shift.)
They could also be stored in "C:\Documents and Settings\All Users\Application Data" so every user on the specific computer gets them.
Or in "C:\Documents and Settings\specific user\Application Data" so each user has his own set on that computer.
I don't use App.Config, but that's just me.
<Aside>
Won't the App.Config get overwritten during an update?
</Aside>
Oh, and the registry is evil.
|
|
|
|
|
OracleConnection con = new OracleConnection(strMyConnectionString);
con.Open();
OracleCommand oc = new OracleCommand(@"DESC MyTable",con); //oops, I forgot the table name
TextBox1.Text = oc.CommandText;
Of course this's not working and that's why I'm posting this. So can you please tell me how do you do it?? I mean retrieving the two columns that would result from the DESC command in Oracle Sql*Plus.
Thank you guys
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
modified on Monday, April 14, 2008 3:29 AM
|
|
|
|
|
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)
(><)
|
|
|
|