|
I don't think I've ever heard of anyone using the Jet engine to read a CSV file.
Most people just read and Split the lines.
|
|
|
|
|
Using Jet (or ACE) is pretty useful because you can use the ADO.Net classes to work with the data instead of manually parsing. It's especially useful for more complex CSVs that have "Excel-friendly" fields similar to
"=""Value""""WithQuotes"""
|
|
|
|
|
If you want to continue using the Jet engine to read in your pipe delimited file then you are going to have to use a schema.ini file as the registry can only be use for a single delimiter value or, use the article Wes linked to and drop using the Jet engine.
|
|
|
|
|
i have created an object at client side and update it some properties values and pass it to the server, to save the object data in database.
Object data is saving correctly and the some properties is also updating at server side of passing object. but when we access the object at client side
then client properties does not update.
so how can we work as reference object between client and server in remoting, means if we update the object properties at server side, then it should show the changes at client side also?
|
|
|
|
|
The only way to do this is to transmit the changes back again. As you are aware, your changes have been made in a separate app process, so they aren't visible. Possibly the "easiest" way to do this would be to raise an event at the server side, which returns the changes to the client.
Search for .net remoting events to find some articles on this because it's not as simple as just coding an eventhandler. Remote events need marshalling too, so you'll need to get a thorough understanding to accomplish this.
BTW - this is also known as a callback.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi, I'm a newbie in drawing using C#.
I want to create a filled cylinder or a tube.
So what I do is I created a closed curve using 4 points (using FillClosedCurve) with 0.8f tension. Then I translated the same closed curve vertically to create a sense of height. But then how do I fill the sides?
Here is an image to illustrate my explanation: http://img692.imageshack.us/img692/9461/100319codeprojectquesti.png[^]
Thanks for any help.
|
|
|
|
|
Valeriant wrote: But then how do I fill the sides?
Fill it by drawing vertical lines, from the left side of the picture. Get a point on the top circle, find the corresponding point on the other circle, and draw a line. You can make the color lighter or darker as you move forward with drawing lines, creating a gradient.
I are Troll
|
|
|
|
|
You mean drawing vertical lines following the path of the curve? How do I get the point from the path? I used only four points (p1 to p4) to create the closed curve. Isn't this solution will make painting slower?
|
|
|
|
|
Yeah, it makes painting much slower and you cannot have the points on the curve returned to you to use, so you have to make something else up.
Seriously, GDI doesn't know anything about 3D. I highly suggest moving on to WPF, OpenGL or XNA instead.
|
|
|
|
|
Valeriant wrote: How do I get the point from the path?
You can calculate it's position, or move to the black pixel that lies on the right side of the current pixel (one higher or lower, perhaps).
Valeriant wrote: Isn't this solution will make painting slower?
Slower, compared to what?
I are Troll
|
|
|
|
|
Eddy Vluggen wrote: You can calculate it's position, or move to the black pixel that lies on the right side of the current pixel (one higher or lower, perhaps).
How do I calculate the position? How do I move to the black pixel? Can you give an example in C#?
Eddy Vluggen wrote: Slower, compared to what?
Slower because it paints n lines compare to just filling a region?
I can draw the ellipse repeatedly while changing the location each draw (height and slant) to create a fill effect, easier to code but slowing the overall painting (I could have lots of cylinder to draw).
I kinda have a feeling that the solution might be a mathematical calculation (with tan, cos or sin), but I really don't have any idea. If I know the outer most point and the correct tension for using, maybe, AddCurve() in GraphicsPath, I could then fill the cylinder's side, right? That's what I think, but any other solution is welcome.
|
|
|
|
|
Valeriant wrote: How do I calculate the position?
The same way that .NET calculates where to draw the dots that form the upper and lower circle.
Valeriant wrote: How do I move to the black pixel?
The simplest way that I can think of would be doing a GetPixel()[^] to the right. It may be located higher or lower than the pixel that you started from.
Valeriant wrote: Can you give an example in C#?
This CodeProject-article[^] might get you started
Valeriant wrote: Slower because it paints n lines compare to just filling a region?
For that you'd first have to define the region to be filled. You can use the FloodFill-algorithm, for example, that would fill everything from a certain point until it "hits" some other color-boundary. Drawing a line is a very fast operation btw.
Valeriant wrote: (I could have lots of cylinder to draw).
May I suggest that you don't try to draw 3D-objects, but move to WPF/XAML[^] or XNA[^]? These make managing 3D objects a lot easier, plus that they have painting-routines that are optimized to misuse any graphics card available.
WPF would be the way to go if the 3D-objects are displayed in an Office-kind of environment, XNA the route if the 3D-objects are used in a game-like interface.
Hope this helps
I are Troll
|
|
|
|
|
I asked the same question in the Algorithm section, thinking that it might got to do with math calculation. Thanks for the help and suggestion.
|
|
|
|
|
Hi, this is my first post so hopefully I get everything in here that I need too.
Here is my problem, I have a command line utility that once running accepts commands / input before displaying results. To keep things simple I am starting to build my understanding using nslookup.
ALl the threads I have found so far relate to executing a command and capturing output, nothing about actually 'driving' a command line utility through the secondary input of commands / instructions.
Can someone help me out here... as mentioned, using nslookup as a sample utility I want to be able to:
- Launch the nslookup utility with no arguments or parameters (this I can do).
- At the point NSLookup returns the '>' prompt, I want to send some input / issue a command to the utility. For example www.codeproject.com.
- I want to capture the results / output of the execution so that I can analyse the text stream within my application, and retain enough control to submit a second instruction to nslookup (i.e. it doesnt exit until I choose to exit).
Any help greatly appreciated
|
|
|
|
|
I guess you have to start nslookup with arguments and then parse the output yourself. Just running nsloolup.exe without parameters will only start the application itself (as you have discovered).
|
|
|
|
|
You can get the output generated by the commandline app (I forget exactly how this is done), and then respond to that.
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
What you want is input/output/error redirection of a process, which is supported by the Process class.
Have a look at the following stream-related Process members:
properties StandardInput, StandardOutput, StandardError
events OutputDataReceived, ErrorDataReceived
As an alternative to using events, you could create a few threads, each dealing with one of the streams, based on a loop calling Read() or ReadLine(). Do not use ReadToEnd() on the output/error streams as they would probably block until the process exits.
|
|
|
|
|
|
This is what I'm playing around with. Except for reading the error stream, and utilities that don't prompt when executed this way, it works pretty well.
|
|
|
|
|
I haven't done that on a local system; only on a remote system -- by telnetting in and using a script to interact with the remote system.
It occurred to me today (before I even read your post) that my script engine might be able to work locally.
My article on my script engine is nearing completion; I hope to finish it up today.
|
|
|
|
|
That sounds like it could be interesting Look forward to reading it.!!
|
|
|
|
|
I have a working example going now. It works with nslookup and at least one utility of my own, but not FTP and TELNET -- they don't prompt when executed in this manner.
How have you progressed in the meantime?
P.S. And I did post my script article. I'm just working on the class that wraps a Process so the engine can use it.
|
|
|
|
|
As a newbie to code writing this one got me really stumped. While I have been contemplating and get help from people here I turned my attention to some other area's that I need to master in order to get to the end of my project. I am now able to churn out windoes services / service installers etc... without much hassle.... all I need to do now is to get my service to drive these cmd line utilities
I havent looked yet but am looking forward to seeing what you have done and how you did it.
|
|
|
|
|
|
i have a form which contain rich text box and that accepts return key.On save of text with multiline text property to the grid it shows a square on enter key press position..pls help
modified on Friday, March 19, 2010 7:32 AM
|
|
|
|