|
Great
Thank you!
Charith Jayasundara
|
|
|
|
|
I have a table defined in a xsd that has an autoincrementing field that is used as the key to the table. The application uses ReadXML and WriteXML function to persists the dataset to an XML file. I am curious as to where the next value to use for the autoincrement field is persisted. I would have expected that when creating a new row in the table, the value for the ID field would be one greater than the highest value found in the table after the dataset is read in. It seems however to persist the highest value used in the past, even if those records have been deleted. In my application, when I create a new row, the ID field contains a 6071 when the highest value used before creating a new row was 5995. It does not appear that the autoincrement seed value is stored in the XML file itself, but where else would it be.
|
|
|
|
|
Hello everyone,
I am writing a backend program which will upload some big files to another server and I want to detect whether current machine's network is busy or not (I want to use relative non-busy time of current machine to upload files, as I do not want to impact other network related task on the machine as the upload file task priority is low).
Does anyone have any idea about how to check whether current machine is busy with network I/O? Should I check some performance counters?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Does anyone have any idea about how to check whether current machine is busy with network I/O?
You can try it with WMI . I think WMI will helps you out.
cheers,
Abhijit
|
|
|
|
|
Thanks Abhijit,
Do you have more detailed advice? Which API from WMI should I use?
regards,
George
|
|
|
|
|
I think You can Download "WMICodeCreator " , and can explore it.
cheers,
Abhijit
|
|
|
|
|
Thanks Abhijit,
I have downloaded the WMICodeCreator. But it is just a tool to list all WMI classes. There are a couple of network and network adapter related classes/properties. Which one should I use?
regards,
George
|
|
|
|
|
When you will select the classes, you will get corresponding properties that are available. And will get the code in right pane, Change the language to C# from Tool.
BTW: Check Senthil post also.
cheers,
Abhijit
|
|
|
|
|
Thanks Abhijit,
I noticed a lot of similar ones related to network and network adapter. As a newbie for this topic, I need exact information about which item should I use.
Any comments or ideas?
regards,
George
|
|
|
|
|
|
Senthil, Thats a good link !!!
cheers,
Abhijit
|
|
|
|
|
Agree, Abhijit.
But I have to use Windows Server 2003.
regards,
George
|
|
|
|
|
Sorry, Senthil.
I work on Windows Server 2003. Any solutons for this platform?
regards,
George
|
|
|
|
|
how can i load the data from data base table to my form
and show the data in text boxes without using the wizard
and how can I move between the rows
|
|
|
|
|
Please Search Google , Before Post Here.
Any way , there are few goods articles on Code Project it self, Hope This will helps you !!
Ref1[^]
Ref2[^]
cheers,
Abhijit
|
|
|
|
|
Dear All,
I have developed many database applications with vb6,vb.net,c# as front end and SQL SERVER and MySQL as Back End.
In truth i checked different tables and views in both SQL SERVER and MYSQL. I got better performance (fast) in SQL SERVER (my own check in a view which had 10000 records). I search alot and find out different ideas about them.
I found in some website that MySQL is faster than SQL SERVER while in other i found that SQL SERVER is faster in performance than MySQL.
In fact i dont know, now the question is what to use with c#, MySQL or SQL SERVER?
if MYSQL than which Engine?
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
There is no 'correct' answer to your question.
If you are coding for fun/your own use, use whichever you prefer, for whatever reason you prefer it. It doesn't matter.
If you are coding in the commercial world it is unlikely that you will get a choice. On those rare occasions that the customer has no preference you should provide them with an honest comparison of the pros and cons of each system. In my experience that means they will elect to use MS SQL Server because of the perceived (often wrongly) support issues from a non open source product.
Honi soit qui mal y pongs - Evil to he who thinks it stinks
|
|
|
|
|
Here in Afghanistan, If you prefer MS SQL Server, then of course the price for that application will increase and if u get MySQL then u have to consider about the performance,replication,recovery and security.
My question is regarding only performance, that which one of these two RDBMS provides faster performance.
Thanks,
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
IF you are using .net as a fron end, then best RDBMS option available is MS SQL. There is a performance gain when we use MS SQL as back end.
And the performance gain is not negligible.
Regarding cost factor for original. Do not install it on your computer. Have one with web hosting account.
Install SSMSE(Its free) on you PC. Connect to remote server and do your job.
|
|
|
|
|
It's very tough to say which is better. I have a high traffic website which uses MySQL as backend and works like a charm. It gives good performance. But you can gain that only by optimizing your queries and code. Proper indexing also reduces the query execution time.
BTW, how are you connecting to MySQL from C#? Is it through Oledb? If yes, that might be the reason for bad performance. Oledb is slow and you should consider the MySQL connector provided by MySQL which can be downloaded from MySQL site. I'd suggest to go with MySQL (5.0 or later).
|
|
|
|
|
I am using MySql.Data.dll with c#, there is no OleDb.
In here if some one asks me what u recommend as back end with c#, i really get stacked, because now i have read different articles about both of them, in truth i do really appreciate to have trusted reference regarding benefits of each and disadvantage of each.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
I think it's impposible to say which one is better. The choice depends on many factors like:
- investment costs (both hardware and licenses)
- desired support level and are you willing to pay for it
- possibly existing databases (why bring a new product if existing are implemented using a different product)
- how familiar you/your team is with the product
- what is the future roadmap for the product etc.
From my experiences, if you are worried about the performance, there's very little difference between different databases, but the way how you get most out of them may be different. So the optimization process may not be equal. However, most of performance isn't coming from the database itself, instead it's how you use it:
- database modelling
- indexing
- types of sql statements
- application logic
- number of roundtrips etc.
If I should say something good for both products:
- both SQL Server Express Edition and MySQL are free to use
- SQL Server has more capabilities and features than MySQL
- MySQL group is very active but the information may be scattered
- integration for SQL Server in .Net is better
But as said, you should think of your environment and your needs in order to make the decision. One product isn't the best choice in all cases, so there's no absolute truth.
|
|
|
|
|
thx alot, infact u solved my problem.
i am sure, after this i would use RDBMS based on Envoirnment and for solving cost i would use SQL Express Edition which is free instead of Management studio.
your answer is really appreciated,
thanks,
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Abdul Rahman Hamidy wrote: thx alot, infact u solved my problem
You're welcome
|
|
|
|
|
Hi
i wanna do a bot program for a game.This program send key strokes to Game Application.But i got a problem.I only wanna send key to Game Application Window Handle not another active window.I write a class for this but i havent get worked it.Its sending keys only notepad not to game or any other window.Can ya help me for this ? Iam sending ya codes below ; and tell me where is my problem. thanx for ur help.
class SendKeySample
{
private static Int32 WM_KEYDOWN = 0x100;
private static Int32 WM_KEYUP = 0x101;
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("user32.dll", SetLastError = true)]
static extern bool PostMessage(IntPtr hWnd, int Msg, System.Windows.Forms.Keys wParam, int lParam);
[DllImport("user32.dll", SetLastError = true)]
private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
public static IntPtr FindWindow(string windowName)
{
foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses())
{
if (p.MainWindowHandle != IntPtr.Zero && p.MainWindowTitle.ToLower() == windowName.ToLower())
return p.MainWindowHandle;
}
return IntPtr.Zero;
}
public static IntPtr FindWindow(IntPtr parent, string childClassName)
{
return FindWindowEx(parent, IntPtr.Zero, childClassName, string.Empty);
}
public static void SendKey(IntPtr hWnd, System.Windows.Forms.Keys key)
{
PostMessage(hWnd, WM_KEYDOWN, key, 0);
}
}
Calling Code ;
var hWnd = SendKeySample.FindWindow("Untitled - Notepad");
var editBox = SendKeySample.FindWindow(hWnd, "edit");
SendKeySample.SendKey(editBox, Keys.A);
|
|
|
|