|
1) Oracle expects date to be in a certain format.
If your table name is MyTable with column MyDate, use bind variables to pass values. Do this:
sql = "Insert Into Mytable(MyDate) Values(:Date)";
OracleConnection conn = ...
OracleCommand cmd = conn.CreateCommand();
cmd.Parameter.AddWithValue("Date", Convert.ToDateTime(txt));
...
modified on Monday, March 30, 2009 2:44 PM
|
|
|
|
|
You can also use the 'TO_DATE(..)' function from Oracle SQL.
|
|
|
|
|
hi
writing another language in textbox whitout using system.globalization or api
this is may be????
???
??
?
.
|
|
|
|
|
You need the System.Globalization reference, there's no way about that, but it doesn't have to be too difficult.
First, the actual language has to be installed on the system, then you can do something like this:
InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(System.Globalization.CultureInfo.GetCultureInfo("ar-JO"));
This is how I localize a textbox to Arabic
If the post was helpful, please vote!
Why won't the worm just leave me be?
|
|
|
|
|
thanks but i know that
i want to write another language that not depend on to system.globalization
|
|
|
|
|
As far as I know, that would be impossible (without reverting back to some API, System.Globalization or otherwise) because they would not be installed on the system. Short of performing Malicious activity which would be installing said scripts/languages on the host system without their knowledge and then utilizing it, if you find out do tell please.
If the post was helpful, please vote!
Why won't the worm just leave me be?
|
|
|
|
|
behzadcp wrote: i want to write another language that not depend on to system.globalization
Why?
It comes as part of the .NET Framework so it is already there.
What is reason for the constraint that demands that you do not use System.Globalization?
|
|
|
|
|
Just out of curiosuty, can you change the language on the fly eg
Get the data from somewhere (DB)
change the culture (possibly for the label only)
write the data to the label.text
change the culture back.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Certainly, I do that all the time. Obviously, you'd want to know before hand which languages you want to display so that you can install them (most latin languages are installed together IIRC but I might be wrong).
Stuff with script like Arabic, Hebrew and Thai need to be installed before hand. After that, its easy peasy, essentially with the snippet I posted to the guy. You might want to invest sometime to decide between variant and invariant culture e.g. AR as opposed to ar-JO (the second being Jordan specific) which might (not in Arabic cultures though) have different defaults such as currency symbol & format, date format etc.
If the post was helpful, please vote!
Why won't the worm just leave me be?
|
|
|
|
|
Thanks - luckily I have not had to do any multi language apps (well 1 but it was before .net).
Mustafa Ismail Mustafa wrote: Why won't the worm just leave me be?
Start calling you Dune boy shortly - it ain't the worm it the bottom feeding laywers.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Thanks - luckily I have not had to do any multi language apps (well 1 but it was before .net).
You're welcome Internationalization is one of the few aspects I would consider myself adept at and that's out of a need. It is not fun though.
Mycroft Holmes wrote: Start calling you Dune boy shortly
Martin Hughes has already started calling me "Worm McBraithewaite"
If the post was helpful, please vote!
Why won't the worm just leave me be?
|
|
|
|
|
OK, my problem is...
I dont know how to hide a <div> when a dropdownlist change the index
I thought I can use javascript to solve this problem, but somehow... i dont know how to use it.
Here the code
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>TESTING</title></head>
<script runat="server" language="C#">
void Page_Load(Object s, EventArgs e){
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e){
}
</script>
<body>
<div id="div1"></div>
<div id="div2"></div>
<form id="Form1" action="TEST.aspx" runat="server">
<asp:dropdownlist id="DropDownList1" runat="server" onselectedindexchanged="DropDownList1_SelectedIndexChanged" >
<asp:listitem>Choose div to be hide
<asp:listitem>Hide div1</asp:ListItem>
<asp:listitem>Hide div2</asp:ListItem>
</asp:DropDownList>
</form>
</body>
</html>
When the user change the drop down into "Hide div2", the <div> with id div2 will hide which is style="DISPLAY: none"
How to use this thing like javascript where the page will not be refresh or postback<<
modified on Monday, March 30, 2009 2:09 PM
|
|
|
|
|
it quite simple, just add runat attribute to that div.
<div id="div1">runat="server"></div>
<div id="div2">runat="server"></div>
eg.
div1.Visible = false;
and its C# forum, you should ask asp questions in asp forum
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I have controls bound to a 1-row DataTable in DataSet myDs:
myNumericUpDown1.DataBindings.Add("Value", myDs, "tbl.field", false, DataSourceUpdateMode.OnPropertyChanged)
etc.
The data is loaded fine. I point DataTable myDt into myDs, catch the ColumnChanged event, and verify after a change that I have:
myDt.Rows[0][e.Column, DataRowVersion.Original] = 2
myDt.Rows[0][e.Column] = 4
...yet GetChanges() returns null. What dumb thing am I missing?
TIA, brian
|
|
|
|
|
Only thing I can think of is maybe try calling AcceptChanges before modifying the DataSet
|
|
|
|
|
The question: Could not find installable ISAM.
A lot of entries I have red bit noone applied to me.
Everything looks fine(regedit shows all that should, file: Msexch40.dll
in a proper place, etc....
But C# exe points out with
System.Data.OleDb.OleDbException: Could not find installable ISAM.
Regards,
Eduard
|
|
|
|
|
Not one question there, whenever I need to access excel files and interact / automate them I use Microsoft's office Primary Interop Assemblies (PIA's)
Microsoft Excel 11.0 Object Library
Office 2003 Update: Redistributable Primary Interop Assemblies
http://www.microsoft.com/downloads/details.aspx?FamilyID=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&DisplayLang=en
|
|
|
|
|
Hi.
I most write program for show all dlls in winxp and details them
please help me or show me code in C# for this program
thanks
|
|
|
|
|
|
Directory.GetFiles on every drive you find (DriveInfo.GetDrives). Construct a FileSystemInfo object from the paths returned and read the file's details (version, internal name, etc.)
|
|
|
|
|
I need to develop a flow chart. I have an object that has 3 integers(an identifier, an upper node and a lower node). Would there be a big performance hit or better way than to create an array and arrange my objects in the array in order to process the image. For example:
First, the lower node is ALWAYS bigger than the upper node. Each area can only have two nodes. All the information will be passed to me and is stored in a datatable.
The list I am given has 10 objects. I set up an array with a depth of 10 and a width of 3(1/3 the # of objects). I place the lowest area(highest lower node) in the bottom and middle of the array and iterate the rest up.
Once I get all the objects placed in the array, I can get the real depth and width and call my graphics to draw the objects.
There shouldn't be more than 40 objects at a time, so theoretically, the max array size would be 40x13. The reason I have to make a bigger array is the flow could be a straight line or could branch off like crazy.
Am I way off on this? I am a newbie if it isn't obvious. I have an image of what the flowchart would look like, or, if anybody needs further explanation let me know. Thanks.
|
|
|
|
|
Guess no response is a good response.
|
|
|
|
|
It sounds really stupid, but I can't seem to override the Date header in a httpwebrequest. Whenever (and however) I try I keep getting the ArgumentException (This header must be modified using the appropriate property.).
Currently my code looks like this:
DateTime dt = DateTime.Now;
idmReq.Headers.Set(HttpRequestHeader.Date, dt.ToString());
I also tried these:
idmReq.Headers["Date"] = dt.ToString();
idmReq.Headers.Set("Date", dt.ToString());
idmReq.Headers.Add("Date", dt.ToString());
The problem is that I need to set the Date header for our centralized identity management system.
Can someone please help?
|
|
|
|
|
AFAIK, the Date (and Host ) properties are set by the system and cannot be changed in code.
/ravi
|
|
|
|
|
Hey everyone,
I've got a datagridview linked to an access database with a seach function. It's working well, but with one problem. It only displays the row(s) when you search for the complete User Name. It would be a big time saver if the search would locate any row(s) which contains the txtSearchID, so you would not need to type out the whole user name every time.
At the moment I am using:
Command.CommandText = "SELECT * FROM Users WHERE [User ID] = '" + txtSearchID.Text + "'";<br />
OleDbDataAdapter Adapter = new OleDbDataAdapter(Command);<br />
Adapter.Fill(ds);<br />
I'm sure theres a simple answer, just can't quite figure it out.
Any help greatly appreciated
Martin
|
|
|
|