|
Yes, if u want to show the latest data then u should use datatable instead dataset
For Example :
<br />
string conect = ConfigurationManager.ConnectionStrings["CON"].ToString();<br />
SqlConnection conn = new SqlConnection(conect);<br />
SqlDataAdapter da = new SqlDataAdapter ("Select * From MyTable",conn);<br />
DataTable dt = new DataTable();<br />
da.Fill(dt);<br />
Hope this can help solve u'r problems
-- modified at 2:01 Monday 10th September, 2007
Regards,
Tomi
|
|
|
|
|
hi friend's
i need to define an array of bit bezause i want to define an array with 2,000,000 cells and i have not enough memory to do it. so i need to define an array of bit or something similar it.
thank you for your guide...
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
Have a look at BitArray
my first google result: Some BitArray example
Good luck,
Jelle Hissink
-- modified at 18:53 Sunday 9th September, 2007
|
|
|
|
|
|
If the bit array doesn't fit and you only need the on/off representation, you can use some long ints and iterate over them. I've done that for some forms where the user had dozens of checked/unchecked options to select.
--
i
|
|
|
|
|
I made a simple configuration class to store program settings. My reason for this was to make the form application more portable (no HDD installation required), able to run on removable drives (e.g., USB), and did not write information to the user's profile or the registry. The answer was obviously a binary data file.
My first test was serialize/deserialize my properties using BinaryFormatter in a serializable class. Although I could have used XML serialization, I chose the binary file route versus text.
The test second option was to simply read and write the properties using BinaryReader and BinaryWriter.
The resulting output file (I call settings.bin) is about 1,000 bytes larger with the serialization technique then with the BinaryWriter option.
My question is; are there any performance differences between the two?
Thanks,
Mark
|
|
|
|
|
Mark,
BinaryReader/Writer should be much faster, however as you are using it only on a small settings file that will propably only be read at startup and saved only when the user changes something. The BinaryFormatter should be fine.
However writing your own file format is somewhat additional work, it simplify upgrades of your software. The formatter might fail when you add, change or remove fields in your settings.
Why can't you use System.Configuration do the work for you, it was made to handle settings (stored in .config files so you can put them on your USB stick).
Regards,
Jelle Hissink
|
|
|
|
|
Jelle Hissink wrote: Why can't you use System.Configuration do the work for you, it was made to handle settings (stored in .config files so you can put them on your USB stick).
Because the settings files are written to the user's "%UserName%\Application Data\Program_Name\" folder, and these are also XML (text) files. The binary disk file, is in the same folder as the application and is always available. So, if I move the application to another PC my settings are there too.
This obviously wouldn't work with registered DLL's and other support files that would require a hard disk install.
Mark
|
|
|
|
|
|
I'm trying to recieve information from my MIDI keyboard, a Casio CTK-800, to be exact. It connects to the computer via USB. So, what I need to know is...
1. How can I find out which keys are being pressed down?
2. Is it possible to play sounds through the MIDI keyboard's speakers (as in, not midi sounds, sounds like vocals)?
3. Is it possible to recieve input from the microphone connected to the computer?
Help would be much appreciated. Thanks!
Hippophobia - Fear of horses. What?
|
|
|
|
|
The very first search result for MIDI keyboard c# returns this result[^]
Why don't you use search?
|
|
|
|
|
I tried searching, but couldn't find anything... Guess I was typing the wrong words! Thanks for the help, anyway.
Hippophobia - Fear of horses. What?
|
|
|
|
|
Hi,
I was wondering if it would ever be possible to do things like
for example: put music into 1kb without quality loss or something like that?
I didn't know in what forum to place it and since I program in C# I thought let's post it here.
|
|
|
|
|
It doesn't seem likely to me. It would requre on heck of an algorithm.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Let's face it, you can't store any sensible amount of data (music, video, code) in 1024 values with a range of -127 to +127.
It's just not possible.
|
|
|
|
|
That will depend entirely on your definitions of music and quality.
If you want to reproduce an existing recording, you will need lots more.
If you have the perfect electronic instrument and all you want to remember is a few pages
of the score, then it can be done.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
No, that's not possible.
Any piece of data contains a specific amount of information. You can't compress anything to be smaller than that amount without losing quality.
Generic lossless compression, like rar or zip, can typically compress data to 50%. Specialised compression, like png, can do slightly better, perhaps 30-40%. The theoritcal limit perhaps is 20%, and future compression algorithms will get closer to that, but never below.
If you are talking about compressing a song into 1 kb, that would mean compressing it to something like 0.005%.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello
I create a DataSet and i fill it from the table i want from the database
how i can fill the datagridview from the dataset with a specific data
i use to fill the dataset just just by the data that i want and i assign the source and members for the datagridview so it show everything in the datagridview
i need to know how i can show a specific data in the datagridview from the dataset
Thanks very much
Assaf
|
|
|
|
|
I saw an article here on CP long ago which saves images to a dll at runtime and we can also retrieve them at runtime, do you have the link for that
or
any way to save and retrieve resources to resource manager at runtime
Thanks And Regards
Amar Chaudhary
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
I don't know which article do you mean by this articles shows a similar thing: SlideShowBuilder[^]
|
|
|
|
|
A quick look shows that I can find solution in this after some cropping
Thanks and Regards
Amar Chaudhary
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Yes you will need to make some modifications but not major ones.
|
|
|
|
|
its working
Thanks a lot
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Can any one tell me how to load xml grammar from file? In sapi 5.1 using sppechlib namespace, we can load it through SAPIGrammarfromfile("name of file"), but how to do this in .net 3.0 using system.speech lib?
Heres the method for loading Grammar in .net 2.0, using SpeechLib namespace.
SAPIGrammarFromFile("XMLActivate.xml");
|
|
|
|
|
How i can delete a sepecific table from a dataset
Thanks in advance
Assaf
|
|
|
|