|
Background:
I'm taking a query from an Oracle Database into a DataSet. Then taking a query from an SQL Database into another Dataset. Merging the 2 datasets, and running the DataAdapter Update. The goal is to keep the Oracle and SQL database tables in sync, and to know what (if any) rows get added/deleted/modified. The issue I'm having is, the Update will update ALL the rows with the same information, or none of the rows even if there are changes. Some additional info, the Oracle Table and the SQL Table don't exactly match, but the Keyed fields are the same (the SQL table has some custom added flags and such). When I do the select, I ONLY select the like fields, in the correct order, and cast the Oracle column Names to be like the SQL column names.
<br />
SqlDataAdapter regionDa = new SqlDataAdapter(regionSql, _sConn);<br />
DataSet regionDs = new DataSet();<br />
<br />
regionDa.UpdateCommand = updCmd;<br />
regionDa.InsertCommand = insCmd;<br />
<br />
OracleDataAdapter oDa = new OracleDataAdapter(oSql, _oConn);<br />
DataSet oDs1 = new DataSet();<br />
<br />
regionDa.Fill(regionDs);<br />
oDa.Fill(oDs1);<br />
<br />
regionDa.FillSchema(oDs1, SchemaType.Source);<br />
regionDa.FillSchema(regionDs, SchemaType.Source);<br />
<br />
regionDs.Merge(oDs1);<br />
<br />
regionDa.Update(regionDs, regionDs.Tables[0].TableName);<br />
Any help would be greatly appreciated.
Thanks!
Scott
|
|
|
|
|
Good day everyone,
I need to do a Login system in ASP.Net using C#.Net as code behind page for my website.
I've got an Access database conntaining username and password.
Is there anyone know where can I find a sample project?
If you're interested in, pls help
Thanks so much.
eric
|
|
|
|
|
Please dont crosspost - this belongs in ASP.NET where you have already posted it!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
The code snippet:
namespace PrintForm
{
public partial class Form1 : Form
{
public Form1(string urlToPrint)
{
InitializeComponent();
webBrowser1.Url = new Uri(urlToPrint);
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
webBrowser1.Print();
webBrowser1.Dispose();
Application.Exit();
}
}
}
I get an error :
RaceOnRCWCleanup was detected
Message: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss.
The error occurs on the webBrowser1.Dispose call.
Using VisStudio 2005
If I put up a message box right after the webBrowser1.Print() call, my document does get printed. I dont see any event handling of printing so theres nothing I can pend on (IsBusy returns false, its apparently only valid for navigation, not useable during printing)
Ideas?
Thanks!
|
|
|
|
|
hi,
i need to design survey software using c#.net. this software will desing survey. all the information of survey will be store in xml file (questions, answeres, type of question...). i would like to know if there is any code on net that i could take look or anyone can help me where to start.
Thanks,
|
|
|
|
|
ap_sa wrote: i need to design survey software using c#.net. this software will desing survey
Looks like an infinite loop to me.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
If MFC code is as follows:
//*CODE SNIPPET - START*
long newtime = 1136710800;
CTime tm(newtime);
str = tm.FormatGmt("%d %m %Y\n%H:%M:%S");
//*CODE SNIPPET - END*
At the execution of last line, 'str' contains as "1/8/2006 9:00:00 AM".
//Question
HOW CAN I REPRODUCE THIS CODE IN C#?
I'll be very thankful if replied at the earliest.
-Kiran
|
|
|
|
|
System.DateTime contains the same capacity as CTime to be constructed from a value and then use the ToString() method to format into a string.
However the underlying values are different. CTime uses seconds since January 1, 1970 while DateTime uses a unit (tick) smaller than a second and starting at January 1,1. So you can't use a CTime value to initialize a DateTime value unless you convert it first.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
hi everybody, i'm new in this, i wanna know if somebody knows how can i block the hot keys of excel, word or another program like this , i open these kind of files from c#, is it possible? . Ahm i'm sorry for my bad english jejeje. Thank's everybody!!!
|
|
|
|
|
I am using a statusstrip control in C#, and I am trying to place a ToolStripLable. I want this label to appear at the right end of statusstrip, Can anyone please tell me how to do this?
thanks,
arti
|
|
|
|
|
Put 2 labels on the statusstrip and set the "Spring" property of the left one to "true". That will push the one on the right out to the end of the strip.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
You can also do this with a single label. Set 'Spring = true' and 'TextAlign = MiddleRight'.
|
|
|
|
|
I was wondering if it is possible to have an icon or imagem (animated gif) on the right of the MainMenu, under the control box. Like IE has, or FireFox, or Explorer. I have searched everywhere on a way to do this without any luck.
|
|
|
|
|
MainMenu does not support having an image displayed on it. Since MainMenu is not a control, there is no way to custom render the image in an OnPaint override either (there is no OnPaint to override). The only option that I can think of is to PInvoke into whatever API is used by IE/Explorer to get that image on the menu. I have no clue what Win32 function provides that functionality.
Josh
|
|
|
|
|
Hi im new to SNMP and developing SNMP applications. I want to code up a custom agent that will run on a projector that is on my network. I was hoping
I could get some guidance as to how to go about this e.g.
How do I deploy it onto the projector?
whether it is possible to use the C# API, if so what class libraries?
if it would be better using something off the shelf to develop it?
Do I need to know about the low level API of the projector?
Any help on this would be much appreciated.
Mike
|
|
|
|
|
We have got several scanned documents(Tiff) in CDs, around 10GB of data. We are looking for a way to make them searchable PDF for easy accessibility.
We are using PDF creator to convert Tiff to PDF also we have built custom module on top of OCR engine which saves text from page by page in Xml.
So, How can I create Searchable PDF out of PDF Image and OCRed text in xml??
We are not looking for high end server side solutions, it would be nice if we can develop our own app or use opensource software.
Regards,
MaulikCE
-- modified at 10:13 Thursday 25th May, 2006
|
|
|
|
|
Hi Maulik,
You can use some OCR like Terrasact from Google or some Paid ones and convert the tiff to text. store the text in an Lucene index using lucence.net and then create a search interface for the lucene index.
let me know if you need any paid consultation for this solution.
My company can provide you the same.
We are experts in Enterprise Search.
Thanks,
Sumit
Globussoft
|
|
|
|
|
I must print an html doc from a web service to a printer installed on the same machine as the web service.
I've tried instantiating a webbrowser object from my class but have threading model problems (cant do it!)
Can anyone shed ideas on how to successfully either :
a. print html from a web service
b. make a web browser object useable in a web service? (STAThread attribute seems to get ignored)
thanks!
|
|
|
|
|
hi all,
firstly:
>i defined a textbox1 on form1 passed on form2 and created form2 like this:
Form2 mehmet = new Form2(textBox1.Text);
mehmet.show();
>and form2's contructor :
public Form2(string s)
{
InitializeComponent();
lblUserName.Text = s;
lblLoginTime.Text = Convert.ToDateTime(DateTime.Now.TimeOfDay.ToString()).ToString("HH:mm:ss");
}
till now everything is fine
what if i want to use that 'text' in another function or class ?
do i have to assign them to different variables in constructor first ???
and what if i have to pass not just one value but many values between forms ???
> is there a more sophisticated way ? or this is the method everyone uses ?
secondly: i defined that textbox1 (on form1) as public and in form2 defined something like this :
Form1 x = new Form1();
lblUserName.Text = x.textBox1.Text; > gives nothing ;(
lblUserName.Text is an empty string ??? cant i get the string value of textbox1 from form1 to form2 by setting it to public ???
where am i doing wrong ???
thanks in advance,
bye.
|
|
|
|
|
you must define it "Public Static" in form1 then u can use it without new form.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: what if i want to use that 'text' in another function or class ?
Then you see to it that the value gets there. There is nothing magical going on, the values are where you put them.
Mehmet Fatih Akbulut wrote: and what if i have to pass not just one value but many values between forms ???
Then you use more than one parameter or put the values together in a class or struct and pass that along.
Mehmet Fatih Akbulut wrote: secondly: i defined that textbox1 (on form1) as public and in form2 defined something like this :
Form1 x = new Form1();
lblUserName.Text = x.textBox1.Text; > gives nothing ;(
lblUserName.Text is an empty string ??? cant i get the string value of textbox1 from form1 to form2 by setting it to public ???
where am i doing wrong ???
You are creating a completely new instance of Form1. That instance will not have the data that you put in the instance of Form1 that already exists. To access the data in the existing instance, you need a reference to it.
---
b { font-weight: normal; }
|
|
|
|
|
|
Mehmet Fatih Akbulut wrote: > To access the data in the existing instance, you need a reference to it.
how can i do this ?
would you please explain a bit more ?
or give a simple example ¿
You can send the reference along when you create the form:
Form2 mehmet = new Form2(this);
And recieve it in the constructor:
public Form2(Form1 form1)
---
b { font-weight: normal; }
|
|
|
|
|
You can use your own custom event and Delegates to achieve the same
|
|
|
|
|
Hi
Consider a RichTextBox with same data in it. Now when a user presses Ctrl key and Scrolls using the mouse the data present in the RichTextBox Zooms In/Out.
I want to disable the zooming of text in RichTextBox. I tried the following code and it worked on my machine but didnt work on other developers machine (not sure why).
private void RichTextBox_MouseWheel(object sender, MouseEventArgs e)
{
base.ZoomFactor = 1.0f;
}
How can i disable Text Zoom In/Out? Is there a property in RichTextBox which i am missing? Please let me know.
Thanks in advance
Kaushik
Development Environment
.Net Framework 1.1
Windows Forms
Microsoft Windows XP Professional Version 2002, SP2
|
|
|
|