Monday, 15 July 2013

vb.net - Convert MySQL DataSet to String -



vb.net - Convert MySQL DataSet to String -

i want check if user administrator or user , want alter dataset string can utilize in label1.

i've tried using 'getxml' comes in funny format 'administrator', it's bit different that. want able utilize value of label1.text other features in program.

here code:

dim sqlconnection mysqlconnection = new mysqlconnection dim serverstring string = "server=localhost;user id=root;password=;database=business elements" sqlconnection.connectionstring = serverstring sqlconnection.open() dim ds new dataset() dim cmd new mysqlcommand("select level users username = '" & usernametextbox.text & "'", sqlconnection) dim da new mysqldataadapter(cmd) da.fill(ds) dim str string = ds.getxml ds.getxml() label1.text = str

try this

dim str string = ds.tables(0).rows(0).item(0).tostring()

mysql vb.net

No comments:

Post a Comment