Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27175

VS 2010 Conditional with Data Base in VB.net

$
0
0
Hi all,

I have created into Vb.net application a SDF database, in which a table call "TL_LOGIN_TB" and a column call TL_LOGIN inside.

Into de application I need that in case someone the enviorament variable %username% is similar of the TL_LOGIN enable the tabcontrol

TabControl.Controls.Remove(SDTrackTAB)

I dont know how to do it, but I was thinking to do similar as this:

Dim cmnd As SqlCeCommand = New SqlCeCommand("select * from TL_LOGIN_TB WHERE TL_LOGIN=%USERNAME%, MyConnection)

IF CMND THEN
TabControl.Controls.Remove(SDTrackTAB)
ELSE
TabControl.Controls.ADD(SDTrackTAB)
END IF

thank you,
Jose Luis.

Viewing all articles
Browse latest Browse all 27175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>