Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
M

Member 4645801

@Member 4645801
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Try-Catch problem in C# console app
    M Member 4645801

    Excellent.... That worked great, but why do I need to set the value to null in the console app and not in the Windows Forms app????

    C# help csharp question

  • Try-Catch problem in C# console app
    M Member 4645801

    I have the following code snippet in a C# console application and am getting the following error in VS2008 on the last line (bool recExists = myReader.HasRows): Error 2 Use of unassigned local variable 'myReader' Here's the code: string sResponse; SqlDataReader myReader; // Check existence of tracking record sQuery = "Select * from tracking where shipper_id = '" + sShipperId + "' AND shipper_ack = '" + sShipperAck + "'"; myCommand1 = new SqlCommand(sQuery, conn); try { myReader = myCommand1.ExecuteReader(); } catch (Exception e2) { conn.Close(); conn.Dispose(); sResponse = e2.GetBaseException().ToString() + " " + sQuery; } **bool recExists = myReader.HasRows**; I use this same identical code in a Windows Client app with no problems. What am I missing???? Thanks, Dave

    C# help csharp question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups