Hi, I receive this error "No default member found for type 'Guid'." when I run my application.
db = New SqlConnection(GetConnectionString())
db.Open()
Dim strSQL As String
strSQL = "SELECT GUID FROM MyLog WHERE MyID = '" & strID & "'"
strGUIDTracker = GetSingleData(strSQL)
..................
Function GetSingleData(ByVal sqlText As String) As String
Dim sd As String
Dim oConn As SqlConnection
oConn = New SqlConnection(GetConnectionString())
Dim strSQLCmd As SqlCommand = New SqlCommand(sqlText, oConn)
strSQLCmd.Connection.Open()
[B]sd = strSQLCmd.ExecuteScalar(System.Data.CommandBehavior.CloseConnection)[/B]
Return sd
End Function
The highlighted line is the statement where the error occured at. I've tested my SQL statements, it really contains a single record.
Can someone please kindly explain to me why am I getting this error here? Thanks alot.