CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 2/10/2005 4:33:21 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 29 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
ldadams
Asp.Net User
Data application block and ParameterDirection2/10/2005 4:33:21 PM

0/0

The following function calls a stored procedure and inputs vars. from my form. I am new to using the data blocks and not quite sure how to use the ParameterDirection

Shared Function SelectOpinionCodes(ByVal coID As Integer, ByVal coName As String, ByVal coDescription As String) As DataSet
Dim sqlParams(4) As SqlClient.SqlParameter


If coName Is Nothing Then
sqlParams(0) = New SqlParameter("@name", coName)
Else
sqlParams(0) = New SqlParameter("@name", DBNull.Value)
End If
If coDescription Is Nothing Then
sqlParams(1) = New SqlParameter("@description", coDescription)
Else
sqlParams(1) = New SqlParameter("@description", DBNull.Value)
End If
If coID = Nothing Then
sqlParams(2) = New SqlParameter("@id", coID)
Else
sqlParams(2) = New SqlParameter("@id", DBNull.Value)
End If
sqlParams(3).Direction = ParameterDirection.InputOutput
Return SqlHelper.ExecuteDataset(conString, CommandType.StoredProcedure, "usp_CodesRulesSelect", sqlParams)
Return sqlParams(6).Value
End Function


Is producing the following error:
Object reference not set to an instance of an object.

Line 33: sqlParams(2) = New SqlParameter("@id", DBNull.Value)
Line 34: End If
Line 35: sqlParams(3).Direction = ParameterDirection.InputOutput
Line 36: Return SqlHelper.ExecuteDataset(conString, CommandType.StoredProcedure, "usp_CodesRulesSelect", sqlParams)
Line 37: Return sqlParams(6).Value
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
ADO.NET: The Complete Reference Authors: Michael Otey, Denielle Otey, Pages: 935, Published: 2003
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Pro VB 2008 and the .NET 3.5 Platform Authors: Andrew Troelsen, Pages: 1377, Published: 2008
Microsoft SQL Server 2005 Developer's Guide: Developer's Guide Authors: Michael Otey, Denielle Otey, Pages: 507, Published: 2005
ADO.NET 3.5 Cookbook Authors: Bill Hamilton, Pages: 980, Published: 2008
Beginning ASP.NET 1.1 Databases: From Novice to Professional Authors: Damien Foggon, Daniel Maharry, Pages: 600, Published: 2004
ADO.NET in a Nutshell Authors: Bill Hamilton, Matthew MacDonald, Pages: 620, Published: 2003
Building Distributed Applications with Visual Basic.NET Authors: Dan Fox, Pages: 763, Published: 2002
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
Beginning Object-Oriented Programming with VB 2005: From Novice to Professional Authors: Daniel R. Clark, Pages: 368, Published: 2006

Web:
Data application block and ParameterDirection - ASP.NET Forums Data application block and ParameterDirection. Last post 02-10-2005 11:33 AM by ldadams. 0 replies. Sort Posts: ...
ParameterDirection.ReturnValue parameters in DAAB parameterDirection parameter that you can set to ParameterDirection.ReturnValue ... (SQL Helper = Data Access Application Block) ...
Using Microsoft Data Access Application Block Mar 3, 2005 ... Explains how to use Microsoft Data Access Application block in C#. ... Direction = ParameterDirection.Output; // @UnitPrice Output Parameter ...
CodeProject: Data Access Application Block .net 2.0 Get Return ... Sep 22, 2006 ... Data Access Application Block .net 2.0 Get Return Values, ...... ParameterDirection.ReturnValue or Output for your output Param ...
Data Access Application Block 3.1 Direction = ParameterDirection.Input; oraParams[0].Value = this. ... Is the Data Access Application Block 3.1 workspace down as I am unable to access the ...
Output params from stored procs using MS Data Access Application ... with this update code of MS Data Access Application Block we can solve our problem ... I set my last parameter to have a direction = ParameterDirection. ...
Safari Books Online - 0321334213 - Effective Use of Microsoft ... Download "The Data Mapping Application Block" .... Value End Set End Property Public Property Direction() As ParameterDirection _ Implements IDataParameter. ...
Call SP with application block (daab) ... I'm using Microsoft's data application blocks to execute a ... VarChar, 20, ParameterDirection.Input, False, 0, 0, "", DataRowVersion. ...
ASPAlliance.com : The #1 ASP.NET Developer Community : Microsoft ... Although the Data Application block is provided in both C# and VB. .... Direction = ParameterDirection.Output; 8: arParms[2] = new SqlParameter("@ UnitPrice" ...
DotNetJunkies :: The #1 .NET Community for Developers Re: Data Access Application Block Posted: 01 Apr 2005 07:23 PM .... Direction = ParameterDirection.Output SqlHelper. ...




Search This Site:










database into datatable

question to the core team regarding skinning in dnn 2.0

error: not a valid base class because it does not extend class 'system.web.ui.page'

invalid method (http verb) was used to attempt access

anyone get ssl connection with sql server to work?

displaying and sorting all profiles

how to store metadata and profile provider

general web deveopment question

how do you create a <span> element?

unique domain names to child portals?

can't retrieve comments using the rsscommenthandler "extension" for named entries

wap vs web site

web parts and design mode

grabbing values from a listbox

dynamic control advice needed

more intelligent question

including an asp page in an aspx page

injecting row into repeater using javascript

sample doesn't work

error "object reference not set to an instance of an object" when adding a new web form

any suggestion for a paypal integrated website?

member / profiledatabase

freetextbox and announcements module

e-mail: cdo or opensmtp?

does the language pack translate emails

server error in '/commercevbsdk' application.

passwordrecovery control issues

new own graphical control

please reply to this problem

julian date

 
All Times Are GMT