Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
lucylmm
Starting Member
1 Post |
Posted - 2005-04-15 : 18:16:09
|
I am new at this, please if you can bear with me,Let said you have a screen where you have let said 3 text boxes,one of then is where the user enter an alpha-numeric entry that could be 8-10 characters long, that data will have to be verified by the the SQL DB, if that is the correct code, in another wordslet said I entered BC2345679 and that number is incorrect, then itshould give me an error that this code is not in the database, because all these codes mean something in the database, let said isthe code for certain equipment. How in VB.NET can we create a code to be able to display this in the screen and what links need to be created so can intercorrelate with the DB SQL server ?Could you give me an example in Visual Basic, please... thank you.Honestly, I have a book in VB ... but I need some help.... I am abeginner. Thank you. I am pulling my hair with this, but I am not given up.Lucy |
|
Dirty_Howi
Starting Member
12 Posts |
Posted - 2005-04-20 : 11:09:05
|
dim cn as sqlconnectiondim cmd as sqlcommanddim strSql as stringdim adp as sql dataadapterdim dts as datasetcn=new sqlconnection("server=YOURSERVER; uid=userid; pwd=password; database=yourdb")adp= new sqldataadapter()dts= new dataset()strSql="select * from tblwhatever where id=" & textbox1.textcmd=new sqlcommand(strsql,cn)adp.selectcommand=cmdcn.open()adp.fill(dts)if dts.rows<>0 then 'data existsendifcn.closetry something along those lines.When i'm right, no one remembers, when i'm wrong no one forgets. |
|
|
|
|
|
|
|