Click here to Skip to main content
15,891,423 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen1-Dec-16 5:03
professionalEddy Vluggen1-Dec-16 5:03 
GeneralRe: Convert VB to C# Pin
Pavlex41-Dec-16 5:05
Pavlex41-Dec-16 5:05 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen1-Dec-16 5:10
professionalEddy Vluggen1-Dec-16 5:10 
GeneralRe: Convert VB to C# Pin
Pavlex41-Dec-16 5:17
Pavlex41-Dec-16 5:17 
GeneralRe: Convert VB to C# Pin
Pavlex41-Dec-16 6:10
Pavlex41-Dec-16 6:10 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen1-Dec-16 8:24
professionalEddy Vluggen1-Dec-16 8:24 
GeneralRe: Convert VB to C# Pin
Pavlex46-Dec-16 22:30
Pavlex46-Dec-16 22:30 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen7-Dec-16 0:29
professionalEddy Vluggen7-Dec-16 0:29 
Pavlex4 wrote:
When I run program with this commands it prints System.Data.SqlClient.SqlCommand!!!
That is following its instructions; "Convert.ToString(mycommand)" will result in that text.

Pavlex4 wrote:
Why it won't show random word from database???
What do you want to load? A single random word? In that case, your query is wrong, as it will result in multiple non-random results, and you should call the ExecuteScalar method on the command. ToString its result and remove the reader Smile | :)

If you want to load all the values in the list of records that the query returns, you'd need a reader indeed. In that case you'd still need the reader and call its Read method. To print them all, you'd need a loop.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 0:49
Pavlex47-Dec-16 0:49 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen7-Dec-16 1:04
professionalEddy Vluggen7-Dec-16 1:04 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 1:07
Pavlex47-Dec-16 1:07 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen7-Dec-16 1:12
professionalEddy Vluggen7-Dec-16 1:12 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 1:14
Pavlex47-Dec-16 1:14 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen7-Dec-16 2:49
professionalEddy Vluggen7-Dec-16 2:49 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 8:51
Pavlex47-Dec-16 8:51 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen7-Dec-16 9:31
professionalEddy Vluggen7-Dec-16 9:31 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 10:29
Pavlex47-Dec-16 10:29 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 11:43
Pavlex47-Dec-16 11:43 
GeneralRe: Convert VB to C# Pin
Pavlex47-Dec-16 21:31
Pavlex47-Dec-16 21:31 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen8-Dec-16 3:02
professionalEddy Vluggen8-Dec-16 3:02 
GeneralRe: Convert VB to C# Pin
Pavlex48-Dec-16 7:55
Pavlex48-Dec-16 7:55 
GeneralRe: Convert VB to C# Pin
Pavlex48-Dec-16 12:27
Pavlex48-Dec-16 12:27 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen9-Dec-16 2:59
professionalEddy Vluggen9-Dec-16 2:59 
GeneralRe: Convert VB to C# Pin
Pavlex49-Dec-16 7:28
Pavlex49-Dec-16 7:28 
GeneralRe: Convert VB to C# Pin
Eddy Vluggen9-Dec-16 7:58
professionalEddy Vluggen9-Dec-16 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.