|
-
Jun 27th, 2019, 11:28 AM
#19
Re: Transfer login info to label/textbox
Yep, that was it. My mistake.
I had misunderstood post #5. I thought that was the error message, which sent me looking at the text of the SQL statement. Now that I see the actual error message, I realize I had left out that step. That's what happens when you type it freehand like that.
By the way, you avoided that error originally because of the way you created the Command object. You passed the SQL string to the constructor, which takes care of the problem in one step. I prefer the nested Using statements, and creating the Command object from the Connection, which gives the Command object the Connection object, but not the SQL string. There isn't a right or wrong to this, it's just a matter of preference. Of course, you do have to not skip a step, as I did, but that's not the step I usually skip. The one I usually skip is opening the connection.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|