stop, grok, and roll
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat | | 26 | 27 | 28 | 29 | 30 | 31 | 1 | | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 9 | 10 | 11 | 12 | 13 | 14 | 15 | | 16 | 17 | 18 | 19 | 20 | 21 | 22 | | 23 | 24 | 25 | 26 | 27 | 28 | 29 | | 30 | 1 | 2 | 3 | 4 | 5 | 6 |
Search
Navigation
Categories
Blogroll
|

Monday, February 20, 2006
save a dataset into the view state
I spun my wheels a bit today getting some parameters to pass into a da.selectCommand. - i definately need to come up with a way store/find/use some common dal snippets.
Along the way i found some good examples on msdn that need to be looked into, search: "dataset examples"
here's how to save a dataset into the view state and rehydrate it:
The example stores a dataset in view state on a Web Forms page.
It first creates an XML representation of the dataset and then stores the XML as a string.
Dim sw As New System.IO.StringWriter
DsNorthwind1.WriteXml(sw)
ViewState("dsNorthwind") = sw.ToString()
This example loads a typed dataset from view state.
DsNorthwind1.Clear()
Dim sr As New System.IO.StringReader(CStr(ViewState("dsNorthwind")))
DsNorthwind1.ReadXml(sr)
2/20/2006 4:54:31 AM (GMT Standard Time, UTC+00:00)
geek

Friday, February 17, 2006
SQL Profiler
I always wondered what was happening in SQL Srv once a sqlcmd got executed. (especially when it didn't work)
At the WinForms .NET Fundamentals SIG this week Mike Brown showed it in use and mentioned it was one of the top 3 sql tools he uses, so I thought I'd give it a shot.
My first attempt I just used any old template, and let the defaults remain... very murky results as it reported stuff at regular intervals from all over. Next I tried changing templates, but that didn't seem to help. I finally went the F1 route - no help there, had to go to help menu. again fruitless, just details of how to do each setting using the menu and no recommendations of what to set to get usefull results. google: sql profiler and found this clue - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenethowto15.asp This pointed me to filtering out just one app or just one database. good stuff and probably very useful oneday, but today I still had a bunch of regular events popping up and muddying up the results table.
Then I stumbled across setting "NTUserName NOT Like SYSTEM". so simple. now all is good and i can clearly see what I'm interested in.
2/17/2006 6:44:25 PM (GMT Standard Time, UTC+00:00)
geek