|
Hi,
Connect to Oracle Database using ADODB.
first you need to add adodb in reference
and then:
ADODB.Connection objConnection = new ADODB.Connection();
if (objConnection.State == 1) objConnection.Close();
// If you are using network terminal
// ---------------------------------
objConnection.ConnectionString = "SERVER=SIDNAME; UID=USERNAME; PWD=PASSWORD;
" Driver={Microsoft ODBC for Oracle};"
// If you are working on Server
// ----------------------------
objConnection.ConnectionString = "UID=USERNAME; PWD=PASSWORD;
" Driver={Microsoft ODBC for Oracle};"
objConnection.Open("", "", "", -1);
Riaz
-- modified at 2:15 Wednesday 24th January, 2007
|
|
|
|
|
Is this for login contral????
nishu
|
|
|
|
|
Hey eveyone,
I recently found an application i made a while back, but i cannot find the source. I want to use it in my own program, preferrably in a panel in my program, or if that cannot happen a dialog would be fine. I need to be able to access some buttons, text boxes, labels, and a listview on the other program. If anybody thinks this is possible with minimal coding it would be a great help.
Thanks.
|
|
|
|
|
One option would be to reconstruct the source from the MSIL. There are a number of tools to do this although I've never tried them myself. Try this[^] Google search.
Steve
|
|
|
|
|
Yup, and you can also use application as library...
|
|
|
|
|
I am doing a database project using the TableAdapter. However, when I go to save using the Update() method, it does not appear in the intellisense and I get the error saying the TableAdapter does not contain a definition for Update(). Any help would be appreciated. Thank you.
-Fred Morstatter
|
|
|
|
|
Does the code compile/run ? Intellisense doesn't always work.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
No. It doesn't compile, it gives me an error saying that the method is undefined.
-Fred Morstatter
|
|
|
|
|
I am a beginner...i need to know how to write and read data in XML. Which is the data is use to create a graph...
|
|
|
|
|
You can just write it as a flat file, but if you want to interact with it using the DOM, use the XmlDocument class.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
Firstly add item->xml file and write the required details
For example:
<articlelist>
<id>1
<heading>Heading 1
etc.....
<by>Author1
<dated>January 05, 2007
<id>2
<heading>Heading 2
etc..etc....
<by>Author2
<dated>January 05, 2007
Now, to read this data the code would be as follows:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("path of the XML file")
XmlNodeList articleList = doc.SelectNodes("which data/node you want to access");
[example you want to access heading tag:ArticleList/Article/Heading]
//to display the nodes
foreach(XmlNode node in articleList)
{
Response.Write(node.InnerText.ToString());
}
**This way we can read the data from the xml file, we are using xmldocument, xmlpath in the above mentioned code...
Gautham
|
|
|
|
|
|
I was wondering how much use people make of attributes to implement "callback" like processing a'la OnDeserialized etc in NET2.0 serialization process.
I tried using OnDeserialized but it was happening too soon for my purposes, ie at the end of the DeSerialize process just before returning to the invoking method. What I needed was my [OnDeserialized] method be invoked after the object returned by Deserialize was put into the target. So I implemented a new trivial attribute [PostLoad] ("Load" being my term for Deserialization, and "Save" for Serialization).
The tricky bit was where to search for methods with the PostLoad attribute - I didn't like the idea of searching the whole assembly ? - but because the object graph was implemented as cascaded class, I only had to search down the nested class tree.
I also realised I could retain the list of methods I find, so the search is only performed once anyway.
|
|
|
|
|
pjd1001 wrote: I was wondering how much use people make of attributes to implement "callback" like processing a'la OnDeserialized etc in NET2.0 serialization process.
I used to think that metadata was the cat's meow. After using it extensively, I discovered that it leads to a maintenance nightmare. If you decide to change the attributes to a property, you have to recompile the whole assembly. Which, frankly, sucks. It would be much better if the metadata was external to the source code, so it can vary in a decoupled way from the code itself. Some people probably would not be happy with that idea. But that's my thoughts on the whole attribute thing.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
I'm not using the attributes to define metadata, or at least I don't think I am.
I give a method an attribute (e.g. [PostUpdate]), in the update process I look for methods with that attribute, if the parameters are the ones I provide then invoke the method - no adding methods to events, no OnBlahBlah methods - obviously not as granular as events (unless you prepared to have lots of attributes)
I thought refactoring was onselling the debts you bought at a discount
rgds phild
|
|
|
|
|
Guys I'm running out of ideas, I want to program something smart and creative so I can further advance my sqls
So far I did programs like:
Multi tab web browser (around web browser control)
Mulit tab editor (rich text box, xml, etc)... by far best thing I did 1200 lines of code in this one
Calculator (like standard win calc)
Some picture viewers both MDI and simple...
Some phone book program...
Student evidential program (take care about student data, massive use of inheritance, abstract methods, arrays, printing, etc).
Quad Media Player... can open 4 media files at once in one form... nice for comparing edited and unedited material...
Fahrenheit-Celsius converter with events...
and lot's of small things...
Now I want to do something on next level...
I don't want to involve much math in it... some level is fine... I want program to be usefull for something I do every day (or at least it's something someone would like to use every day)?
Any idea is welcome?;P
|
|
|
|
|
if you program every day, why not write something to help you do that.
I could do with something that generates UIEditors for complex objects eg
Dictionary<Guid, Dictionary<string, LinkedList<T>>> etc
that way you'll learn how to cope with restrictions imposed by existing infrastructure in this case the IDE.
|
|
|
|
|
Want to help me with this?[^]? It definitely qualifies as "something on the next level".
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Marc Clifton wrote: qualifies as "something on the next level"
Sound interesting but it's way ahead of one level up, I'm only doing c# for 2 months now... so maybe later who knows...
I guess I'll just stick with ADO.NET 2.0 for now... that is next thing I need to learn good I guess...
Still good ideas are welcome...
|
|
|
|
|
Lets say you have two text boxes, and you want to update one any time the other changes, regardless of which changes.
For example converting between Miles and Km.
How do you prevent the endless loop?
David Wilkes
|
|
|
|
|
Remove the event handler that listens for changes of the other textbox before you change its value and readd it afterwards.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
The XXXchanged events only fire when the value really changes, assigning a value that is
not different from the current value does not fire the event.
So it all boils down to the question: is my calculation numerically stable, i.e. will
it converge to a single value.
If yes (as with linear transformations, e.g. your unit conversions), dont do anything special.
If no (or unknown), break the loop explicitly (e.g. by removing and reinstalling one of
the event handlers).
The following example has two TextBoxes, showing a number and its square; for some of the
values (e.g. 50) it will take two iterations, but it always reaches a stable result:
public class CPTest_ChangedEvent: CPTest {
TextBox tb1=new TextBox();
TextBox tb2=new TextBox();
System.Windows.Forms.Timer timer=new System.Windows.Forms.Timer();
public override void Run() {
tb1.Text="1";
tb2.Text="1";
tb1.TextChanged+=new EventHandler(tb1_TextChanged);
tb2.TextChanged+=new EventHandler(tb2_TextChanged);
timer.Interval=1000;
timer.Tick+=new EventHandler(timer_Tick);
timer.Start();
}
private void tb1_TextChanged(object sender, EventArgs e) {
string s=tb1.Text;
log("tb1_TextChanged: "+s);
double i1=double.Parse(s);
double i2=i1*i1;
tb2.Text=i2.ToString();
}
private void tb2_TextChanged(object sender, EventArgs e) {
string s=tb2.Text;
log("tb2_TextChanged: "+s);
double i2=double.Parse(s);
double i1=Math.Sqrt(i2);
tb1.Text=i1.ToString();
}
private void timer_Tick(object sender, EventArgs e) {
string s=tb2.Text;
double i2=double.Parse(s)+1;
tb2.Text=i2.ToString();
if (i2>100) timer.Stop();
}
}
Luc Pattyn
|
|
|
|
|
or a flagging mechanism can be used here.
|
|
|
|
|
I had a similar problem while using a combo box and grid row updation.
Try using "SelectionChangeCommitted" event. This would be fired only when the control selection is changed explicitly by user.
|
|
|
|
|
Hi,
I have made a simple Windows Application in VS.Net C# which downloads the file from a FTP location.
Now, I want this application to run daily at 4:00 AM in the morning. What should be the solution to acheive this goal. Since its a very small code, so I can re-write the code if required.
Thanks in Advance,
Harjinder
|
|
|
|