M
MSNEWS
I get this error when trying to run a SQL command, maybe my program is
silly, I'm pretty new at this :
Additional information: SqlCommand.Prepare method requires all variable
length parameters to have an explicitly set non-zero Size.
selcmd.Connection = con
selcmd.CommandText = "SELECT identcol FROM resumeconv_directories"
selcmd.Parameters.Add("@directoryname", SqlDbType.Char)
selcmd.Parameters("@directoryname").Direction = ParameterDirection.Input
selcmd.Parameters("@directoryname").Value = thedirectory
selcmd.Parameters.Add("@identcol", SqlDbType.Int)
selcmd.Parameters("@identcol").Direction = ParameterDirection.Output
selcmd.Prepare()
selcmd.ExecuteReader()
MsgBox(selcmd.Parameters("@identcol").Value)
silly, I'm pretty new at this :
Additional information: SqlCommand.Prepare method requires all variable
length parameters to have an explicitly set non-zero Size.
selcmd.Connection = con
selcmd.CommandText = "SELECT identcol FROM resumeconv_directories"
selcmd.Parameters.Add("@directoryname", SqlDbType.Char)
selcmd.Parameters("@directoryname").Direction = ParameterDirection.Input
selcmd.Parameters("@directoryname").Value = thedirectory
selcmd.Parameters.Add("@identcol", SqlDbType.Int)
selcmd.Parameters("@identcol").Direction = ParameterDirection.Output
selcmd.Prepare()
selcmd.ExecuteReader()
MsgBox(selcmd.Parameters("@identcol").Value)