<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7153635226296640190</id><updated>2011-10-18T16:55:04.571-06:00</updated><category term='Fishing'/><category term='SQL'/><category term='ASP.net'/><title type='text'>My Fishing Stream</title><subtitle type='html'>ASP.net, SQL, and vbscript coding I have been using to generate pages and maintain different sites. Also a good supply for fly fishing enthusiast for the NorthWestern States including Utah.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://myfishingstream.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-2303764784457018224</id><published>2010-05-13T09:55:00.000-06:00</published><updated>2010-05-13T09:55:30.682-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Converting Time in DATETIME to Zero</title><summary type='text'>The biggest question I get in regards to date functions is a quick way to convert the time portion of datetime to zero (or 00:00:00), regardless of where you get the date.
There are several options out there, but the easiest to implement and remember for me is using, what I call a flip-flop.  
First you date the date and convert into an float.  This turns your date into a Julian date which does </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/2303764784457018224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/2303764784457018224'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2010/03/converting-time-in-datetime-to-zero.html' title='Converting Time in DATETIME to Zero'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-1881427446133801846</id><published>2010-03-04T10:13:00.000-07:00</published><updated>2010-03-04T10:13:15.460-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How to Get the First or Last Day of a Given Month</title><summary type='text'>   This seems to be a frequently asked question that people give multiple answers to.  Even I struggled with something so simple. Why?? I think we all too often try to think out of the box when often times the box holds the answer.
GETTING THE FIRST DAY OF THE MONTH   Subtract the day on the month +1 from the date.  Simple huh?

     DATEADD(d,-DAY(getdate())+1,getdate())
 GETTING THE LAST DAY OF</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1881427446133801846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1881427446133801846'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2010/03/how-to-get-first-or-last-day-of-given.html' title='How to Get the First or Last Day of a Given Month'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-1207532381054071550</id><published>2010-02-01T12:46:00.001-07:00</published><updated>2010-02-01T12:52:25.143-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net'/><title type='text'>How to Check if File Exists (VB)</title><summary type='text'>How to check to see if a file exists before allowing an upload to your server.  
In your Upload code-behind add the following lines to your btn_click sub:
...
  If System.IO.File.Exists(path &amp; Upload1.Filename) THEN 
  code on what to do if it exists
  End If
...
Here is an example of my code with some error handling and reporting lines.  You will need to change the generic objects to your id </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1207532381054071550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1207532381054071550'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2010/02/how-to-check-if-file-exists-vb.html' title='How to Check if File Exists (VB)'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-625050202001724213</id><published>2010-01-28T15:46:00.003-07:00</published><updated>2010-01-28T15:49:23.725-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net'/><title type='text'>ASP.Net Login Errors</title><summary type='text'>"CREATE DATABASE permission denied in database 'master'."This was the bane of my existence for several days.  I scoured the web to see what other people were doing to resolve the issue and I just got the same stuff, the stuff I was doing.  
BACKGROUND:  I am using SQL SERVER 2005 to host my data and aspnetdb from the ASP.net framework. I already have the ASPNETDB installed.  This DB install </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/625050202001724213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/625050202001724213'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2010/01/aspnet-login-errors.html' title='ASP.Net Login Errors'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-5499653671440986273</id><published>2009-12-03T16:33:00.000-07:00</published><updated>2009-12-03T16:33:53.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Nested Cursors</title><summary type='text'>I was working on a problem at work to find items within a given property, within a given aspect, within a... (you get the point)  But what to do in the case that @@fetch_status &lt;&gt; 0 would it break all levels of the nesting?  It can if you do it wrong.  There are several examples on the web, but here is the best way to conquer this relatively simple query.

   First you need to create your </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/5499653671440986273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/5499653671440986273'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2009/12/nested-cursors.html' title='Nested Cursors'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-5183893935279929873</id><published>2009-11-21T18:53:00.000-07:00</published><updated>2009-11-21T18:53:59.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net'/><title type='text'>How to set a default item to an  datasource generated list in ASP.net</title><summary type='text'>    While creating a site I created a DetailsView to insert and update some item.  While I created a view that allowed inserting and updating, changed a field item to a template view and added a dropdown to pull a list of options from another table within the database.  This was all well and good but I ran into a situation where there were some dropdowns that I would not utilize while adding or </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/5183893935279929873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/5183893935279929873'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2009/11/how-to-set-default-item-to-datasource.html' title='How to set a default item to an &lt;asp:Dropdown&gt; datasource generated list in ASP.net'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-1470513414950822266</id><published>2009-11-10T10:41:00.004-07:00</published><updated>2009-11-21T18:55:23.583-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net'/><title type='text'>To display a drop-down list while editing or inserting</title><summary type='text'>
*** This can be used for editing or inserting.  For inserting change the ItemTemplate section from EditItemTemplate to InsertItemTemplate. ***
From the Data node of the Toolbox, drag a SqlDataSource control onto the page.

Configure the datasource

Right-click the GridView control and select Show Smart Tag. In the GridView Tasks menu, select Edit Columns. 

In the Fields dialog box, select City </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1470513414950822266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/1470513414950822266'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2009/11/to-display-drop-down-list-while-editing.html' title='To display a drop-down list while editing or inserting'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7153635226296640190.post-427239157530931801</id><published>2009-10-24T16:35:00.003-06:00</published><updated>2009-12-03T16:39:53.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fishing'/><title type='text'>New Fly Tying Website</title><summary type='text'>I am working on a fly-fishing website that will feature fly patterns and instructions.  Members will be able to access instructions (up to X/month).  Guests will be able to see a list of flies and pattern/materials of 5/month. </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/427239157530931801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7153635226296640190/posts/default/427239157530931801'/><link rel='alternate' type='text/html' href='http://myfishingstream.blogspot.com/2009/10/new-fly-tying-website.html' title='New Fly Tying Website'/><author><name>Who Am I?</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
