Results 1 to 9 of 9

Thread: [RESOLVED] Posting Nulls to a SQL Server Stored Procedure

Threaded View

  1. #4

    Thread Starter
    Fanatic Member aconybeare's Avatar
    Join Date
    Oct 2001
    Location
    UK
    Posts
    772

    Re: Posting Nulls to a SQL Server Stored Procedure

    I've changed my proc to the following and it's worked, the object reference error must be caused by the call to IIF??

    VB Code:
    1. 'myCmd.Parameters.Add("@middlename", IIf(MName.Text = vbNullString, CSQ(MName.Text), DBNull.Value))
    2. myCmd.Parameters.Add("@middlename", DBNull.Value)
    Does anyone know what namespace I need to reference to use IIF? Or do I have to write the function myself as we used to have to do for vbScript?
    Last edited by aconybeare; Sep 18th, 2005 at 07:30 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width