Jump to content
Xtreme .Net Talk

pcf108

Avatar/Signature
  • Posts

    30
  • Joined

  • Last visited

pcf108's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. You might also want to try... System.Threading.Thread.Sleep()
  2. Well, I'm not sure if that would work in this scenario... After somethought, I came up with a pretty simple T-SQL solution using a temp table and updates. Putting the following in a stored procedure... SELECT *, AdjustWidth = Width - 1, AdjustThickness = Thickness + 4, TotalWidth = Width INTO #sizeResult FROM Orders UPDATE #sizeResult SET TotalWidth = 2*AdjustWidth + AdjustThickness SELECT * FROM #sizeResult I'm not sure that this method is efficient but it seemingly does the trick. The procedure could perform multiple selects into several temporary tables, but I'm guessing an UPDATE strategy would work better for more calculations. I didn't check performance. In addition, it might be possible to add columns to the temp table... From what I can tell CLR would work too (perhaps with better performance). Building a SqlMetaData result set and populating a DataSet, performing the calculations, and sending the MetaData through the SqlPipe. So, it looks like I have a few real-time options. Since I'm not working with 2005, I'll stick with T-SQL.
  3. That's what I was thinking, it's just that this result set would be used for reports, exporting, & ODBC connectivity to machinery. A SQL solution would likey fit the bill better... I keep thinking CLR in 2005 would do the trick, but i have zero experience, plus it kinda freaks me out, microsoft overload. I'll take a look at the expression columns though, sounds intruiging.
  4. I'm having a bit of design quandry... I need to return a result set of calculated values based upon multiple columns of data. Basically they are size calucations based on a table with Height, Width, and Thickness... In T-SQL... (simplified, AdjustWidth involves CASE and gets complex) SELECT [indent]Height, Width, Thickness, AdjustWidth = Width - 1, AdjustThickness = Thickness + 4, TotalWidth = 2*Width + Thickness + 2 TotalTimes8 = 16*Width + 8*Thicknes + 16[/indent] TotalWidth depends on "AdjustWidth" but it cannot be reffered to directly because is not a column. I'd like to be able to do something like this, with a local variable SELECT [indent]Height, Width, Thickness, @AdjustWidth = Width - 1, @AdjustThickness = Thickness + 4, @TotalWidth = 2*@AdjustWidth + @AdjustThickness TotalTimes8 = 8*TotalWidth[/indent] But this is not allowed in T-SQL. And I would need to return the variables in the result set. I could write the calculation all inline like the first example but it gets incredibly confusing and longer the deeper I get (mostly due to CASE statements). I could write the adjustments as functions but then calling the same functions over and over. I could build out a DataSet programmatically, but then I'd have some deployment issues. Any ideas on how to accomplish something like this on the back end? I'm thinking about attempting to do this with CLR in 2005... Thoughts?
  5. After some investigation, it seems that .NET does not have very good classes built for this yet. I'm switch to java and JAXB.
  6. I'm looking to create valid XML documents that match a specified DTD. I know that I can use XmlDocument DOM to create nodes one by one and output the document but this is tedious and I have several documents that I need to create that match supplied DTDs. It's also a problem because the DTDs change so frequently. I don't know if there's a way to do it in .NET with XSLT. If I could somehow translate the DTD into a typed DataSet and use that class to manipulate data and write the document out. Solving this would make me one happy programmer.
  7. i luv notepad Well, in case anyone is interested. I seemed to remember something about PDFs being readable in notepad. So I popped one open, and sure enough... Then downloaded the Adobe PDF reference manual. And found that there are textual tags such as "/Page " indicating a new page item and also tags for crop size and media size. So I'm parsing the pdfs for the heck of it... I think it'll work out but it seems so simple that i'm skeptical.
  8. Is there any way to retreive a PDF document's properties such as Page size, and page count? I have found several libraries that generate PDF documents, but I merely want to read some of the properties that are usually displayed in reader. The adobe PDFLib does not appear to have anyway of doing this. I am considering getting the adobe SDK (cost $200), but I'm not sure that it's not overkill or that it will work well with .NET Anyone have any advice/knowledge to share here?
  9. I am working on creating a script that spawns a thread and runs the Windows XP "lpr" command-line submitting a job to a poscript print server.... or something. It works fine, however... Unfortunately the windows LPR command does not have any method of supplying a copy count (that I know of). In unix/linux it's "-#<numberofcopies>". This basically negates the whole purpose of the script if I can't set the number of copies to print. Anyone know of a way i can send postscipt print jobs effectively from a windows workstation?? Is there any lpr command for windows that will do this?? Can I queue documents with raw data and the OpenPrinter and WritePrinter commands?? Some advice or a point in the right direction would be greatly appreciated.
  10. I'm guessing the problem is in your page handling the post. Are you using request.InputStream or request.Form("FName")?? Can you debug server side or perhaps run IIS locally and test to see if the request stream is coming as expected?
  11. I'll check out the ErrorProvider control... Thanks.
  12. I'm writing some code to better deliver error messages to users, I was wondering if anyone might have some source that they think might work well for delivering information from exceptions from try and catch. I've been using the console to catch the errors in development, but this isn't very useful to the user. If anyone could help it'd be cool. If not, I'll survive.
  13. That indeed does work. Thanks.
  14. Quick question, If I add two or more event handlers for the same event, is there any way of telling or changing the order in which they execute. Sample... Private Sub Click2(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click MsgBox("Event 1 Fired.") End Sub Private Sub Click2(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles Button1.Click MsgBox("Event 2 Fired.") End Sub
  15. Deeee... MouseUp event works for this if anyone is interested.
×
×
  • Create New...