36 Chambers – The Legendary Journeys: Execution to the max!

March 26, 2008

Programming Links Of The Day, 3/26

Filed under: Uncategorized — Kevin Feasel @ 6:54 pm

We’re back to some XML Bulk Loading links today.  To start with, I received a very interesting error, summed up in this link:  XML Bulk Load unable to load schema.  An error occurred (Unknown Error).  Not only is that a brilliant error message, but there’s very little on the Internet about it.  My problem was that I was trying to access the schema from the local C drive but apparently the service running bulk uploading did not have access privileges to that file.  I rectified this by putting it on the local web server (because our particular app is a web app which runs locally on individual machines).

After that, I received the even-better following error message:  “Unspecified error (Exception from HRESULT: 0×80004005 (E_FAIL))”.  I don’t believe that there are any posts on the internet which relate directly to the bulk uploading service, but in my case, the problem came about because I was missing an attribute row in my XML schema.  It might have something to do with it being the final attribute of the schema, but it was special enough to merit this cryptic error code.  So check all of your values and make sure that you aren’t missing any table fields is my advice.

A final XML-related set of links:  XML files can’t parse certain characters, including the ampersand (&), less than (<), greater than (>), and quotation mark (“) symbols*.  Fortunately, Jon Galloway (who is certainly not Joey Galloway) has an easy fix:  run the replace command on a string as you create your XML and you should be good to go.  If you need to validate your XML files—which I needed to do, as I did not know about the ampersand problem—you can always use the W3 validator.  The price is right and because it’s JavaScript, it runs mighty fast even with relatively large files.  And just for posterity’s sake, here is HTML rendering for different quotation marks.  Most people just use &quot; but you can be special.

Moving on to .Net controls, if you want to perform an action on each row in a GridView, it’s rather simple, as this post demonstrates.  The example there is selecting a check box, but it’s generically applicable and works well for times when you have to work with the grid after data binding.  And to end things with a slight bit of CSS, if you want to have two divs next to each other, make both “float:left” and as long as their widths do not exceed the width available in the container/browser window, you’ll be in good shape.  I used this to have two separate forms in my MVC application:  a section to add notes and a section to upload files for those notes.

* – Okay, they will parse quotation marks if you use single-quotes around values, but I use standard quotation marks because they’re less likely to occur in my particular data sets.

The Silver is the New Black Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 75 other followers