|
if you are using oracle the following query can be used to retrieve the table names based on the column-name
select * from dba_tab_columns where lower(owner) = 'order_schema' and lower(column_name) like '%column-name%'
Satish
|
|
|
|
|
Hi All,
Can you please help me in solving the below problem.
I am trying to access the Windows schduler task programmatically using c# to enable/disable the task.
The task is already created. Can you give me some idea how do i go about it?
Thanks in advance.
Regards,
Sunny
|
|
|
|
|
The last time I did this was by COM interop to the ITaskScheduler interface.
«_Superman_»
|
|
|
|
|
|
Need to update application configuration
private void UpdateAppSettings( string settingName, string settingValue)
{
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
AppSettingsSection appSettings = config.AppSettings;
KeyValueConfigurationElement setting = appSettings.Settings[settingName];
setting.Value = settingValue;
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
}
Not able to build the application error showing thet Configuration is not there in System.Configuration namespace
|
|
|
|
|
You have to add a reference to the assembly.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello,
there are a function that allows to know the number of page of a Word file by opening it? thank you very much.
|
|
|
|
|
Nova has developed Social Networking Channel (SNC) for one year. User can add his/her events of their lives to the system; then the system will turn the events into a line presented by Flash. SNC can also interface with other social network websites, like Facebook and MySpace, so users can easily use this system when they visit Facebook and Myspace.
We used Web Client SoftWare Factory as the architecture, and used Nhiberate,AntiXssLibrary,Ajax in the process of developing.
Web Client Software Factory is based on MVP, but it is optimized, so it is more easier to maintenance for good-sized system. We added Nhiberate in MVP, so the logic of the architecture is clearer and the code is simpler. On the other side, Web Client Software Factor is interface oriented; accordingly it is better compare to MVC.
One of the most important feature of Web Client Softeare Factory is Depency Injection (DI). An config file always exists for Depency Injectionto kepp the Depency object. It will return a depency object through a special role of the system. For example:
Public Model User{
String name;
}
Public Controller IUserController{
Public void Add();
}
Public Controller ChineseUser:IUserController();
Public Controller EnglishUser:IUserController();
Public Viewer UserViewer{
Private IUserController _userController;
Public IUserController{
//Get the current DI of UserViewer through the system role form the //config file, the following method can be implemented by the DI //system automatically
Return CurrentController;
}
}
modified on Wednesday, February 11, 2009 8:27 PM
|
|
|
|
|
This is a programming forum, if you want to advertise pay for it
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi all. I'm trying build a C Sharp applicatiopn that would scan through my hard disk which has two partitions, i.e. C: and D:, for all the pdf file type document but i have no idea on how to start.
Anyone with an idea?
|
|
|
|
|
|
Thank you. I'm working on it.
|
|
|
|
|
Hi,
My problem is that I want to find a specific color in a certain area of the screen.
I'm using GetPixel[^] to find the color of a specific point on the screen, but it doesn't give me the ability to search an area of the screen.
What I have come up with so far is these while loops, which does the following:
1. Loop through the X values at the first "line" of the area.
2. Set X to 0. Increment Y by 1 (going to the next "line" of the area).
3. Repeat.
In the code below I'm searching in the area between 0,0 and 50,50.
int x = 0;
int y = 0;
int x2 = 50;
int y2 = 50;
while (x <= x2 && y <= y2)
{
while (x <= x2)
{
Color c = Win32.GetPixelColor(x, y);
if (c.R == 128 && c.G == 128 && c.B == 128)
{
}
x++;
}
x = 0;
y++;
} Can this be achieved in a better way?
By the way, as you can see in the comment in the code, I want to break out of the loop there if the specified color has been found, but it didn't work out with the break keyword. Don't tell me I have to use the G word.
Thanks.
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
Hi,
as I can see it, the simplest solution is to use a flag, whether the value was found or not:
bool bFound = false;
while ((!bFound) && (x <= x2 && y <= y2))
{
while ((!bFound) && (x <= x2))
{
Color c = Win32.GetPixelColor(x, y);
if (c.R == 128 && c.G == 128 && c.B == 128)
{
bFound = true;
}
if(!bFound)
x++;
}
if(!bFound) {
x = 0;
y++;
}
}
Better way would be to put this while thing into method and call return when you found the Color.
Regards
Sebastian
|
|
|
|
|
Thanks
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
int x1 = 0;
int y1 = 0;
int x2 = 50;
int y2 = 50;
Color colorCheck = new Color(128, 128, 128);
bool found = false;
for(int x = x1; x <= x2; x++)
{
for(int y = y1; y <= y2; y++)
{
if(Win32.GetPixelColor(x, y) == colorCheck)
{
found = true;
Console.WriteLine("Color found at {0},{1}", x, y);
break;
}
}
if(found)
break;
}
If only MySelf.Visible was more than just a getter...
|
|
|
|
|
Thank you
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|
|
I had two hundered tables in database. I want to retrive the tables with one common field.How to does this .I Want use C# and Sql .I had different Tonnage in all the tables. if i want to call 300 tonnage in that all the tables(200 tables).How to retrive it from the datatable in the database.
thank's in adv.
m.lavan
modified on Wednesday, February 11, 2009 4:31 AM
|
|
|
|
|
Probably best of in the database forum...
What database is it (SqlServer/Access etc), do you want to do this in C#, and what do you mean by one common field?
Regards,
Rob Philpott.
|
|
|
|
|
I'm building a screen with windows form. I need to have a start day and end day.
To solve this I'm using two dateTimePickers, one for the start and one for the end day.
When people change the end date before the start date, the start date will be that from the end date.
But when people change the start date to after the end date, the start date should be the end date. So the end date is like the master dtp.
Now there is a problem to implement this in windows XP. The error occurs when people select the start date and press the 'month further' button. When this happens, an event goes of (value changed) and there will be a check (start date before end date), if this is false the start date is set again (event goes of again) and a messagebox is shown.
But the strange thing is that directly after the first messagebox a next messagebox is shown (and the startdate is 1 month higher than before, this loops until eternity (or you close all the messageboxes with pushing enter).
In Windows Vista this won't occur.
I guess that the event (month-further-clicked) is remembered by the computer and therefore occur everytime.
But what is the workaround for this strange bug?
|
|
|
|
|
I want to get an image through webcam using c#.
can someone answer following questions
1.need i know the hardware of webcam?
2.what APIs are available in C# for getting images from webcam ?
3.when webcam is ON, where are the frames buffered before they are played?
Can Someone please guide me for how to access frames from webcam?
|
|
|
|
|
Hi all. I am stuck witha bit of a problem. I am using Threads to do my processing and to update my prgressbar. Below some of the code.
ThreadCode
private void btnRun_Click(object sender, EventArgs e)
{
ThreadStart excelrun = new ThreadStart(RunExcel);
Thread startprogress = new Thread(excelrun);
startprogress.Name = "Update ProgressBar";
startprogress.Start();
}
Code in the RunExcel calling the Progressbar thread.
progressBar1.Invoke(new updatebar(this.UpdateProgress));
UpdateProgress Code
private void UpdateProgress()
{
string filepath;
filepath = txtboxSelectTxtFile.Text;
int lines = File.ReadAllLines(filepath).Length;
progressBar1.Minimum = 0;
progressBar1.Maximum = lines;
progressBar1.Value = progressBar1.Value + 1;
int progrval = 0;
progrval = progressBar1.Value;
progrval = progrval + 1;
lblProgress.Text = ((progrval * 100) / Convert.ToInt32(progressBar1.Maximum)).ToString();
lblProgress.Refresh();
lblPercent2.Refresh();
lblRecordProcessed.Text = progrval.ToString();
lblProgText.Refresh();
lblRecordProcessed.Refresh();
}
As you can see from the above that eachtime the progressbar thread is called it does a read of the whole file to obtain the file size which is pretty inefficient. How can I change this to only read the file size once, store the size and use that to determine the Maximum size?
I am stuck and not sure how to get this changed to work more efficiently.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Set the progressbar's minimum and maximum once and not everytime in UpdateProgess. My suggestion would be to do it in RunExcel where you are processing the file(i guess so). In UpdateProgress keep on updating the current progressbar's value.
Edit - typo
|
|
|
|
|
Thanks AbitSmart. I'll try this and see how it goes.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
I tried this and I get the following Cross Thread Error when running the App.
"Cross-thread operation not valid: Control 'progressBar1' accessed from a thread other than the thread it was created on."
Any other Ideas??
Excellence is doing ordinary things extraordinarily well.
|
|
|
|