I've changed my proc to the following and it's worked, the object reference error must be caused by the call to IIF??
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?VB Code:
'myCmd.Parameters.Add("@middlename", IIf(MName.Text = vbNullString, CSQ(MName.Text), DBNull.Value)) myCmd.Parameters.Add("@middlename", DBNull.Value)




Reply With Quote