Last post May 10, 2012 05:11 AM by Damiano
Mar 15, 2012 08:08 AM|PJLaurenson|LINK
I am creating an email validation system that when a user joins, an email with a guid is sent to them that they click on to go to verify.aspx?id=GUID-GUID-GUID-GUID to change the account status to active in my MYSQL Database.
I don't even know if this is the right approach but I need to get the value of the column named UserId in the same table for the matching guid... because UserId is passed on for greater tasks :-)
It's just not playing nicely.
Here is my code so far. Any guidance would be appreciated....
Dim MembershipUserId As String
Dim c As New MySqlConnection(ConfigurationManager.ConnectionStrings("LocalMySqlServer").ConnectionString)
Dim com As New MySqlCommand("select * from userdetails where guid='" + QuerystringGuid + "';", c)
Dim myReader As MySqlDataReader = com.ExecuteReader()
MembershipUserId = myReader("UserId").ToString
Apr 18, 2012 03:10 AM|srinivasaprabhu|LINK
Is "UserId" column a case sensitive.
else means u ve to make that into case sensitive while querying man.
Apr 18, 2012 05:49 AM|ceenu4u|LINK
Check whether the value that you are passing exists in the table other wise the line
MembershipUserId = myReader("UserId").ToString()
will throw an error you have to check for the null before converting it to ToString().
May 10, 2012 05:11 AM|Damiano|LINK
what is the error message that you get? posting error message will help us trace if not we will be just guessing the possibility of error