Jump to content
Xtreme .Net Talk

quwiltw

Leaders
  • Posts

    493
  • Joined

  • Last visited

Everything posted by quwiltw

  1. I do this from an xml config file. Shared Sub New() cnnStr = GetConfig("connectionString") strRootDir = GetConfig("rootDir") intRecentDefinition = GetConfig("recentDefinition") strRootWebDir = GetConfig("rootWebDir") End Sub Private Shared Function GetConfig(ByVal key As String) As String Try Dim xmlDoc As New XmlDocument() xmlDoc.Load("..\Config.xml") Return xmlDoc.GetElementsByTagName(key).Item(0).InnerXml Catch ex As Exception Throw New Exception("Error reading configuration file: Config.xml", ex) End Try End Function
  2. quwiltw

    Ping!

    divil gave this link in another post. have you checked it out? http://www.csharphelp.com/archives/archive6.html
  3. When you say "crapped out," is that the text of the exception? I've never had a MS thrown exception with that sort of message. More insight than "crapped out" would be helpful. Just based on what I see up there, I don't see you creating or setting the UpdateCommand of the dataadapter. btw. I think naming the dataadapter cmd is quite confusing too.
  4. I've had all of my columns showing while building my little app and have been accessing the selected primary key (ID) via it's row/column index because it has been shown. Now I have applied a TableStyle to it that hides the ID (which the user shouldn't care about anyway). What's a reliable way of finding out a column in the underlying (bound) dataset that is not currently being displayed in the datagrid? ie. Dataset has columns (id, title, message, url) but Datagrid only has (title, message, url)
  5. The GetElementsByTagName method of the XmlDocument class will do using the DOM. If you really need efficiency (i don't at the moment and so haven't invested the time to learn the other approaches), you might want to look at another way though. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemxmlxmldocumentclassgetelementsbytagnametopic.asp Edit: shucks, looks like I didn't hit submit fast enough:)
  6. It's even worse. For some reason I can't simply remove it through the DOM either, as it is apparently not treated like any other attribute on a node. My workaround is to pull out the outerxml as a string, rip off the namespace declaration with string manipulation and the loadXML with the string. It's not very elegant but it works. I'd still like to know if anyone else has encountered this before?
  7. I'm having a weird issue. I'm essentially writing a dataset out and transforming it with XSLT. It works perfectly if I delete the namespace declaration on the root element but by default the Dataset includes this even if I put the mode in ignoreschema. Anyone seen this problem before?
  8. Access can have a total of 32,768 objects in the database. I must admit I didn't believe this so I wrote a simple little script to test it and now have an Access database with 32,000 tables in it. It's around 267Mb and they're all empty. In SQL Server, tables are limited by the number of objects in the DB too, which is 2,147,483,647^4. Not sure about Oracle but assume it's at least this much. For more info: Access Help -> "Access Specifications" SQL BOL -> "maximum capacity specifications"
  9. Not sure I completely understand what you're trying to do, but all sites on the same box should be addressable via their port number. ie. (localhost:80, localhost:8080, etc.)
  10. I'm not sure about AS400 terminals, which you'd have to do a different way. But grabbing text from other sites can be done as I described above. Use the WebRequest class to get the contents of the page then use regular expressions to parse through it and grab the chunk you need.
  11. http://samples.gotdotnet.com/quickstart/howto/doc/WebRequests/clientGET.aspx [edit]Fixed link[/edit]
  12. I'd start here and combine this info with *lots* of regular expressions... http://samples.gotdotnet.com/quickstart/howto/doc/WebRequests/clientGET.aspx I've assumed you're talking about scraping web sites, but after posting this noticed it's under windows forms. If you're asking about "real" screen scraping, then I've not clue:(
  13. I don't really understand what you're asking. As in: from the browser uploading a file to the web server, or moving files from the web server elsewhere? Maybe you could expand your description?
  14. RE: Samples, Tutorials, and Books I reformatted the resources that I posted before but was unable to edit that post now that it was moved. I think they'll be more useful like this. Maybe someone could edit it for me with this list? Thanks, --tim .NET Framework Class Library The documentation for all framework classes. Most include remarks and examples for the methods and properties of the classes. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp GotDotNet Quickstart Tutorials These are excellent well focused modules on specific tasks of interest. Be sure to check out the Common Tasks section. http://samples.gotdotnet.com/quickstart/ MSDN Code Samples Code Samples from Microsoft. More advanced code samples than above and less tutorial. http://msdn.microsoft.com/vbasic/downloads/samples/default.asp www.asp.net From the IBUYSPY Portal to the ASPNET Forums, this site includes a number of reference web application implementations that demonstrate solid coding practice. Be sure to check out the Starter Kits tab. http://www.asp.net www.windowsforms.com The sister site to http://www.asp.net. Includes articles/samples for Windows Forms. http://www.windowsforms.net/
  15. The request for samples, book referrals, and good tutorials gets asked alot. Maybe we could add some "sticky" threads like over at EVBF's Tutors Corner to send people for a comprehensive list rather than whatever we can remember off the top of our head? To start off, I'd nominate these: .NET Framework Class Library The documentation for all framework classes. Most include remarks and examples for the methods and properties of the classes. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp GotDotNet Quickstart Tutorials These are excellent well focused modules on specific tasks of interest. Be sure to check out the Common Tasks section. http://samples.gotdotnet.com/quickstart/ MSDN Code Samples Code Samples from Microsoft. More advanced code samples than above and less tutorial. http://msdn.microsoft.com/vbasic/downloads/samples/default.asp www.asp.net From the IBUYSPY Portal to the ASPNET Forums, this site includes a number of reference web application implementations that demonstrate solid coding practice. Be sure to check out the Starter Kits tab. http://www.asp.net www.windowsforms.com The sister site to http://www.asp.net. Includes articles/samples for Windows Forms. http://www.windowsforms.net/
  16. I think the tutorials on this page are great. Be sure and check out "The Common Tasks Quickstart". http://samples.gotdotnet.com/quickstart/
  17. Didn't catch that. Use the Nz function and replace the qty in the select with it. Something like this: select items.item_id, desc, Nz(qty,0) As Quantity from items left join spl_item on items.item_id = spl_item.item_id remember to change the qty to your column name for quantity.
  18. Don't suppose we could keep "Lite" or a bird-named equivelant when this happens? I've read "Who Moved My Cheese?" 4 times and still have a hard time with some changes:)
  19. Is qty really the name of your quantity column? Change it to whatever the actual name of that column is.
  20. Did you want to do this in the dataset or in the database? in the database just do a left join on Item_id: select items.item_id, desc, qty from items left join spl_item on items.item_id = spl_item.item_id in the dataset I think you'll have to create a relationship, then a DataView to do this, if that's what you wanted, let me know and I'll see what I can do.
  21. When someone gives an answer like that, they are pointing you where to look in the framework. With this information, if you can't figure out your answer through the hints in Intellisense, you need to look at the Framework Documentation, which usually gives a little example and explanation of what the precondition and postcondition for the methods are. For example, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiodirectoryclasscreatedirectorytopic.asp
  22. That's a little clearer, albeit quite verbose, method, but I still think this many nested conditionals indicates a larger problem, in this case possibly working with more data than he needs. If for whatever reason, he can't just only bring back the data he actually needs, then I'd suggest throwing some Boolean operators in the equation.
  23. Why are all these records coming back from the database? You have five separate conditions that you're bringing all the records back only to exclude. Seems like you'd be better off using a where clause in the DB instead. Either way, it's kinda tough to tell exactly what you want to happen with all of the nested conditionals. It looks like some should be sibling conditionals (ie. Condition1 AND Condition2) instead of nested. I guess the question is what do you want to happen if they are a RESELLER? none? null?
  24. I haven't seen anything built in that does this. There are a number of OpenSource Java tools that help out and I found this that you might want to take a look at too. http://apps.gotdotnet.com/xmltools/xmldiff/default.aspx
  25. EDITED to remove a bad guess:( BTW, what does the error say?
×
×
  • Create New...