|
I'm working with VS2005, i create Crystal report bind it with DateSet and inside the form i put crystalreportviewer to display report data, after running project i foubd that crystal report is empty but DataSet has data inside it, i tried many time to check why this happend but i can't find any solution (note: i made DataSet with wizerd and crystal report too, so i didn't write any code).
please any one know why this happend please tell me
|
|
|
|
|
Hey,
Does anyone know of a way in .NET (C#) to use a key that will decrypt a something but not encrypt it. I looked at RSA,DSA, and TripleDES but when getting the private key it includes the public key as well. Does anyone know if this is possible or would I need to rethink my design.
Thanks
--
John
|
|
|
|
|
John,
I belive RSA is what your looking for. The basic idea is use the public key to encrypt the private key to decrypt. You can get the RSA class to export the key pair without the private key.
Hope this helps
~Nick
Forever Developing
|
|
|
|
|
Look at wiki
Mainly, you are concerned about the difference between Symmetric-key cryptography and Public-key cryptography.
From your post, it seems like you need Public-key cryptography but there is a catch!
Public-key by itself cannot encrypt large messages.
Public-key crypto is usually used for setting up a shared key or digital signatures(DSA).
In shared key, one encrypts the key using a Public-key crypto(RSA,ECC,...) and sends it to the other party. The other party decrypts the key and then both parties switch to a Symmetric cipher for future transmissions. (There is also diffie-hellman key exchanges as well).
In a DSA (roughly), you encrypt the hash of your message.
It might help if you explain in more detail what you are trying to do.
|
|
|
|
|
I'm looking at encrypting a small XML file which will contain settings. Now I want the file to be unencrypted so it's readable but not the ability to encrypt a new XML file to replace it.
Cheers
--
John
|
|
|
|
|
Does the XML file need both confidentially and authentication?
Or just authentication?
|
|
|
|
|
Just authentication, do you know of a better solution to my problem?
Thanks.
--
John
|
|
|
|
|
|
Hi!
You could sign a hash value of your data (private key required for that) and verify the integrity of the hash using just the public key.
For this you only have to include the public key into your app and keep the private key safe.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I am in the proccess of writing a small membership program and all the info is being stored in an MS Access database. I've gotten stumped on coding the datagridview's "DataRelation" object because I'm having to code through three table levels.
To explain, I want to create families (Father, Mother, Children) and link them through the DataGridview.
I have a master table called "tblFamilyNames" that holds the "primary key" and anniversary date. I then have a table called tblFamilyDetails. It links the family(Father, Mother, Children) together by storing the primary key value from tblFamilyNames in a column called "intFamilyID".
In tblFamilyDetails, there is a column: "intMemberID" that points to a record in the third table: tblMembers".
My question is, how do I bind the first table: "tblFamilyDetails" with the third table: "tblMembers" so that the user can see the member's info without seeing the intermediate table: "tblFamilyDetails"?
may your code be error free
|
|
|
|
|
Hi all doing good,iam making a project on tele-presence or tele-operated robotic arm basically the progress where iam facing problem is i have compeleted the design and i hve used HS-422 servo motors and for the serial communication i have used atmega which is known as SSC-32 where it can be found at http://www.lynxmotion.com/Product.aspx?productID=395&CategoryID=52[^]
the code is in C and its complied through AVR compiler it has completed my 70% work and now the front hand remaining which i have to intreact through windows application to control arm my application has 3 features one is tht arm can be control on normal values by passing instruction and the second tht is continues movement and the third one is tht it can control by client by passing values to server now i was making on C# firstly i am not good in C# making it on Vs2005 and secondly i dont knw which component i should use like in vb6 mncom.ocx is easy but here no idea and there 2 components are given serial com in toolbox when we select windows project ..now the application iam talking about is already avaliable on java tht is open source in tht code there are 2 libararies in tht and there are classes givin in tht which is given in the link ..
http://sourceforge.net/projects/armcontrol[^]
so basically is tht i want to convert it to c# but please i need help in which componenet i should use and how i pass intruction to move motor any code snippet in c# please some one help
regards
|
|
|
|
|
VB6 is crap and works only because of OCX components that do the real work. Any COM component you may have, will work from C#, but C# is fully able to communicate with your serial ports, without any component. It can't talk to C code tho, unless it's in a Dll, then you can call it through p/invoke.
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 )
|
|
|
|
|
any procedure for tht i mean for dll and using p/invoke..
|
|
|
|
|
It's pretty straightforward, but you'd do better to look it up on MSDN or even pinvoke.net, there's articles on it here on code project, also. I think Nish has one where he refers to it as IJW ( it just works )
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 )
|
|
|
|
|
Hi,
I once looked into AVR, but ended up using a small Microchip PIC instead
(with assembly code).
And did serial comm with that, long before .NET emerged.
I will revamp that project pretty soon, this time with .NET !
if you can control the target by sending commands over a serial line,
if you know the command language (syntax and semantics),
if the number of bytes per second is reasonable (less than say 500),
if your PC has a serial port that is compatible with your target's,
if your cable is set up correctly (null modem needed?),
then you could simply write the PC-side of the app using C# and
use the SerialPort class for communication.
The SerialPort class offers port initialization, plus elementary read and
write operations (both in binary in case you need bytes, or in text characters
if your commands are "printable"). If text, be careful about text encoding,
C# uses Unicode characters (which are 16-bit), your target probably uses
8-bit ANSI (or 7-bit ASCII), so you may need an explicit Encoding.ASCII
If your command language is built from printable text, I would advice you test
your hardware set-up first, using a terminal emulator such as HyperTerminal.
If not, you need to start programming right away and would be best to try a
simple and harmless output command first, something that would make your
AVR show some reaction without being time critical or dangerous.
Then you could try to receive something; hopefully your target sends
something when it starts up, so you would catch that and show it on a Form or
Console. Your first receive attempt might use a synchronous read; final code
would require you switch to asynchronous operation, i.e. you install
a handler that gets triggered by a DataReceived event (soemwhat similar to an
Interrupt Service Routine); be careful, the event runs on a separate thread, one
that cannot reliably operate on GUI Controls, you would need Control.Invoke()
for that.
Have fun !
|
|
|
|
|
thnx for the info yes my commands are not printable iam trying to making it simple for mapping the values ..and the baud rate also its simple but any code snippet where i can get a little more idea. thnxx..
|
|
|
|
|
The CodeProject site hosts several articles on serial port and C#, such as
this one[^].
It uses printable text, which is not what you need, but it shows you how to
open a port, how the asynchronous DataReceived event works, how to use Invoke(),
etc.
You could study it, and you might even decide to modify it to make it work with your
binary command language, so you could use it to get accustomed to the
communication stuff before doing your real application.
|
|
|
|
|
well i do see it i understood the code one thing is confusing me that wht did u meant exactly by printable values by seeing this i was thinking somthing different before can u elobrate please i will be really thankful..
|
|
|
|
|
When setting up a communication (or a storage) you have to make a basic decision
as to how represent the commands or data.
1. one way is using text (say ASCII characters); the advantage is you can read
it easily, you can save it to a file, then edit it; you can use an RS232C spy
to watch the characters on the cable, you can use a terminal emulator, etc.
The disadvantages are you need more bytes (since not all bit combinations
are allowed, e.g. ASCII printable is only 0x30-0x7E), and you must encode
(translate number to chars) and decode (translate chars to number).
2. the other way is using bytes simply as binary bit patterns, as you have
choosen to do. In this case, you must provide your own command encoder/decoder,
so a general-purpose tool such as a terminal emulator cannot help you in the
debug stage.
As far as SerialPort class goes,
For 1. you typically would use the methods Write(string), ReadChar, ReadLine;
for 2. you would use Write(byte[]), ReadByte, Read.
|
|
|
|
|
thank u for all the info Luc...i just wanted to add tht is these are the only steps that i hvae to follow...or any other instructions also ..thanks regards
|
|
|
|
|
You're welcome.
I can not possibly predict everything you might need in your further development,
that is part of the planning (guessing?) stage. You are in the best position
to know the requirements, the context and the status...
|
|
|
|
|
i think i mail tht java code also ..exactly tht will be in C# but u meant ..tht the code for controlling the servos will be in tht also right..when we open port then we pass on the intructions ..for the movement right..something like tht..or not..
regards
|
|
|
|
|
|
in short how we move servos from software applications like do we have to map the valus for 0-255 or 0-128 depending on the baud rate how ? please explain
|
|
|
|
|
If your target contains one (or more) servos, you should provide a command to
select the servo and give it a new position.
As explained before you either use textual commands (easier to use and debug,
slightly more difficult to receive and decode) or binary commands.
That's up to you.
The baud rate is not really relevant, except for one thing: you need sufficient
bandwidth to pass all the information in time (you can not send 100 bytes per
second over a serial line that operates at 110 Baud !) If you need to download
(PC-to-target) a lot of data (say a speed ramp-up/ramp-down table) or maybe the
target's code itself, then you might want to use a relatively high baud rate...
Please keep in mind that receiving serial data on PC-side is somewhat tricky
(independent of baud rate): a PC is very busy with a lot of processes and threads,
so it is not always ready to capture incoming data. Therefore I recommend you
limit the target-to-PC communication to a few messages per second, and avoid
them to be time-critical.
This also means that low-level algorithms (such as move until micro switch
gets closed) are best handled by the target in autonomous mode, without
involving the PC (so PC says "move till switch closes", target does whatever
it takes to do that, then target reports "OK, did it, switch now closed".
Hope this helps, and fits the plans you have.
|
|
|
|