Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: SQL & Flowcentric Pin
Dave Kreskowiak19-Sep-08 7:31
mveDave Kreskowiak19-Sep-08 7:31 
QuestionCommunicate between tcp and com port.. Pin
Subjugate18-Sep-08 19:36
Subjugate18-Sep-08 19:36 
AnswerRe: Communicate between tcp and com port.. Pin
jzonthemtn19-Sep-08 4:57
jzonthemtn19-Sep-08 4:57 
QuestionBinding whole data to listview at a time(lacks of data) Pin
pavanip18-Sep-08 19:13
pavanip18-Sep-08 19:13 
AnswerRe: Binding whole data to listview at a time(lacks of data) Pin
Dave Kreskowiak19-Sep-08 7:30
mveDave Kreskowiak19-Sep-08 7:30 
QuestionHow to get the IP address of the machine using Windows API in .NET Pin
SAHIBas18-Sep-08 18:53
SAHIBas18-Sep-08 18:53 
AnswerRe: How to get the IP address of the machine using Windows API in .NET Pin
jzonthemtn19-Sep-08 1:58
jzonthemtn19-Sep-08 1:58 
QuestionData saving problem? Pin
lahsiv18-Sep-08 8:11
lahsiv18-Sep-08 8:11 
#1 (permalink) Add to desperateboy's Reputation Report Post
Old Today, 1:09 PM
desperateboy desperateboy is online now
VB.NET Forum Newbie
.NET Framework: .NET 1.1 (VS 2003)

Join Date: Dec 2007
Posts: 20
Reputation: 12
desperateboy is on a distinguished programming path ahead
Default Insertion problem in database
hi friends,

I have added 3 buttons of name add,save and delete.When add username in the database first heck out that already exist or not.If not existed then insert into database.I trying using this code

Plz help to sort it out.

Try
dim str1 as string
str1 = txtusr.Text
conn.Open()
cmd = New SqlCommand("select * from usrs where uname='" & (str1) & "'", conn)
dr = cmd.ExecuteReader
While dr.Read()
str = dr.Item("uname")
If str <> Trim(str1) Then
usrexist()
Exit Sub
Else
Dim sYN As String
sYN = MsgBox("User Already Exists, Want to Update", vbYesNo + vbQuestion, "Update User")
If sYN = vbYes Then
'' update in the database''
End If

End While

Catch ex As Exception
MsgBox(ex.Message)
Finally
cmd = Nothing
conn.Close()
dr.Close()
End Try
AnswerRe: Data saving problem? Pin
Paul Conrad18-Sep-08 11:27
professionalPaul Conrad18-Sep-08 11:27 
GeneralRe: Data saving problem? Pin
ChandraRam19-Sep-08 7:54
ChandraRam19-Sep-08 7:54 
GeneralRe: Data saving problem? Pin
lahsiv20-Sep-08 8:32
lahsiv20-Sep-08 8:32 
GeneralRe: Data saving problem? Pin
ChandraRam20-Sep-08 8:38
ChandraRam20-Sep-08 8:38 
GeneralRe: Data saving problem? Pin
lahsiv20-Sep-08 21:10
lahsiv20-Sep-08 21:10 
Questionvb.net Pin
sreenivi18-Sep-08 3:02
sreenivi18-Sep-08 3:02 
AnswerRe: vb.net Pin
Jon_Boy18-Sep-08 3:38
Jon_Boy18-Sep-08 3:38 
AnswerRe: vb.net Pin
Dave Kreskowiak18-Sep-08 3:41
mveDave Kreskowiak18-Sep-08 3:41 
GeneralRe: vb.net Pin
Jon_Boy18-Sep-08 4:02
Jon_Boy18-Sep-08 4:02 
QuestionCheck Component dll at start of the application Pin
pdnet18-Sep-08 2:10
pdnet18-Sep-08 2:10 
AnswerRe: Check Component dll at start of the application Pin
Mycroft Holmes18-Sep-08 3:10
professionalMycroft Holmes18-Sep-08 3:10 
GeneralRe: Check Component dll at start of the application Pin
pdnet18-Sep-08 3:36
pdnet18-Sep-08 3:36 
GeneralRe: Check Component dll at start of the application Pin
jzonthemtn18-Sep-08 7:49
jzonthemtn18-Sep-08 7:49 
GeneralRe: Check Component dll at start of the application Pin
Ashfield18-Sep-08 21:34
Ashfield18-Sep-08 21:34 
QuestionUse aspx Authentification system Pin
thesum17-Sep-08 21:57
thesum17-Sep-08 21:57 
AnswerRe: Use aspx Authentification system Pin
Christian Graus17-Sep-08 22:28
protectorChristian Graus17-Sep-08 22:28 
QuestionHow to open poppup window in window application Pin
Piyush Vardhan Singh17-Sep-08 21:50
Piyush Vardhan Singh17-Sep-08 21:50 

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.