473,320 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SqlHelper problem


Why does the following code error out when there is a null
in the field I'm trying to retrieve? As it stands I need
to check each field for nulls. Anybody know of an easier
way?

SqlDataReader MyDR = SqlHelper.ExecuteReader
(SessionInfo.ConnString, "sp_SctyDetail", sctyid);

SctyDetail MySctyDetail = new SctyDetail();

MySctyDetail.sctypersid = MyDR.GetInt32(1);

Mike
Nov 17 '05 #1
0 774

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rajesh Madhra | last post by:
Hi everybody I just solved my probem about creating my own assemblies by using the command line vbc /nologo /t:library /out:MyClass.dll ... MyClass.vb with your help. But I still cannot make...
3
by: Brian | last post by:
I am trying to pass a null value into a stored procedure so that it can save the data. I am using Microsoft's SQLHelper dll to do this. My example code is below. How do I pass in a null value...
0
by: Peter Lin | last post by:
Dear all, I am using Microsoft.ApplicationBlocks.Data, for one thing I am not quite sure. Is the following static SqlHelper ExecuteReader method from source codes not thread saft in multithread...
0
by: Rajesh Kumar | last post by:
Hi Gregory Thanks for your answer. I did not see any attached file so I copied your text into a text file and named it compiler.bat Checked the wrapped lines and runned the file. It said Dataset,...
0
by: Rajesh Madhra | last post by:
Hi Gregory Thanks for your answer. I did not see any attached file so I copied your text into a text file and named it compiler.bat Checked the wrapped lines and runned the file. It said Dataset,...
7
by: Neven Klofutar | last post by:
Hi, I have a problem with SqlHelper.ExecuteScalar ... When I try to execute SqlHelper.ExecuteScalar I get this message: "System.InvalidCastException: Object must implement IConvertible.". ...
4
by: FyinsFlip | last post by:
Microsoft Data Access Blocks (SqlHelper) you can do an insert and get the new row ID without using a stored procedure? DataMembers.Car_IDObject = SqlHelper.ExecuteScalar( _connectionString ,...
0
by: Manuel | last post by:
I'm using the SQLHelper class to do an insert and get the identity field this way: -------------- Dim sql As String = "INSERT INTO () VALUES ('MyMessage');SELECT SCOPE_IDENTITY()" Dim ds As...
0
by: rockdale | last post by:
Hi, All How to get the output parameter's value when you use the SQLHelper (Microsoft Data Access Block)? When I try to access my ourput parm I got the following error. ...
4
by: John F | last post by:
Hello All, What is the consensus on using sqlhelper or not using sqlhelper when calling stored procedures? We're trying to go with a standard for our projects and personally I prefer not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.