asp_beginner
10-03-2004, 09:40 AM
Hi,
No matter what i tried...i still get the error. I tried using ctype but doesn;t work. Please help!
Dim arrText As ArrayList = New ArrayList
Dim arrText1 As ArrayList = New ArrayList 'comment
Dim mySqlConn As New sqlConn
Dim SQLConn As SqlConnection = mySqlConn.returnConnection()
Dim strSQL, strConcatName As String
strSQL = "select Title,id from tbl_category where Title not in (Select c.Title from tbl_Category c, tbl_usercategory uc, tbl_user u where u.ID=uc.userid and c.id=uc.categoryid and uc.userid=" & intUserID & ")"
Dim cmd As SqlCommand = New SqlCommand(strSQL, SQLConn)
SQLConn.Open()
Dim reader As SqlDataReader = cmd.ExecuteReader()
Try
While reader.Read()
If Not reader.GetValue(0) Is DBNull.Value Then
arrText.Add(reader.GetString(0).ToString) 'getting title which is in string
arrText1.Add(reader.GetString(1).ToString) 'getting id which is integer
End If
End While
Finally
reader.Close()
SQLConn.Close()
End Try
No matter what i tried...i still get the error. I tried using ctype but doesn;t work. Please help!
Dim arrText As ArrayList = New ArrayList
Dim arrText1 As ArrayList = New ArrayList 'comment
Dim mySqlConn As New sqlConn
Dim SQLConn As SqlConnection = mySqlConn.returnConnection()
Dim strSQL, strConcatName As String
strSQL = "select Title,id from tbl_category where Title not in (Select c.Title from tbl_Category c, tbl_usercategory uc, tbl_user u where u.ID=uc.userid and c.id=uc.categoryid and uc.userid=" & intUserID & ")"
Dim cmd As SqlCommand = New SqlCommand(strSQL, SQLConn)
SQLConn.Open()
Dim reader As SqlDataReader = cmd.ExecuteReader()
Try
While reader.Read()
If Not reader.GetValue(0) Is DBNull.Value Then
arrText.Add(reader.GetString(0).ToString) 'getting title which is in string
arrText1.Add(reader.GetString(1).ToString) 'getting id which is integer
End If
End While
Finally
reader.Close()
SQLConn.Close()
End Try