Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

VB.NET Programming Corner!

Re: VB.NET Programming Corner! UPDATED!!!

Paano naman po yung sa garbage collection?

Pang read lang naman ito. Hindi pang write and OLEDB ang ginamit ko.
Pag click nila ng Upload. Yung nakadeclair na fields ko pupunta sa SAP.
91920qnbzuwphboalxbm.jpg


In case wala excel nkainstall sa PC , gumamit k StreamReader or TextReader function...
 
Re: VB.NET Programming Corner! UPDATED!!!

mga ka-symb!!..."RC" here of INFORMATICS COMPUTER INSTITUTE..just want to share something about our school...
our school provides world class IT training and education institution and present in more that 30 computer schools and training centers all over the country...we offer programming trainings like VB.NET, java, C lang, DHTML, PHP etc..we also offer 2 years to 3 years diploma programs that is credited world wide...based on the british ladderized system..making the students globally competitive and ready to work even only after a year!...If you guys are interested just text me at 09164559385...and just look for me...

thank you guys and have a nice day!
 
Re: VB.NET Programming Corner! UPDATED!!!

mga ka-symb!!..."RC" here of INFORMATICS COMPUTER INSTITUTE..just want to share something about our school...
our school provides world class IT training and education institution and present in more that 30 computer schools and training centers all over the country...we offer programming trainings like VB.NET, java, C lang, DHTML, PHP etc..we also offer 2 years to 3 years diploma programs that is credited world wide...based on the british ladderized system..making the students globally competitive and ready to work even only after a year!...If you guys are interested just text me at 09164559385...and just look for me...

thank you guys and have a nice day!

are you a student or marketing officer of informatics?
 
Re: VB.NET Programming Corner! UPDATED!!!

ok na yang naka install sayo na .NET
pwede mo lagyan yan ng SQLServer 2008 express edition para libre lang at di pirated


Sir, pede ba aq makahingi ng site n pedeng pag downloadan? wala aqng idea qng ano sa mga lumalabas sa net ung dapat qng gamitin eh.. thx ulit.. :)
 
Re: VB.NET Programming Corner! UPDATED!!!

Sir, pede ba aq makahingi ng site n pedeng pag downloadan? wala aqng idea qng ano sa mga lumalabas sa net ung dapat qng gamitin eh.. thx ulit.. :)

can you at least lift your fingers and google this?

"SQLServer 2008 R2 Express Edition"

malaking tulong na po yan lalo sa sarili mo kung alam mo ang gusto mo hanapin
 
Re: VB.NET Programming Corner! UPDATED!!!

sino po bang may sample jan bawt add, update, edit, and delete using msaccess?...for reference lang sana di ko pa rin kasi ako makalagay nang data using msaccess...anayway ano po bang mali dito


Private Sub BtnRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRegister.Click

Dim breturn As Boolean
Dim strquery As String

Dim cn As ADODB.Connection
cn = New ADODB.Connection
cn.ConnectionString = kbstrConnectionString
On Error GoTo Err_LINE

cn.Open()
'strquery = "INSERT INTO UserInfo ("
'strquery = strquery & "UserCode, "
'strquery = strquery & "Name, "
'strquery = strquery & "Address, "
'strquery = strquery & "Mobile, "
'strquery = strquery & "Username, "
'strquery = strquery & "Pwd, "
'strquery = strquery & "Type, "
'strquery = strquery & "Tcode, "
'strquery = strquery & ")"
'strquery = strquery & "VALUES "
'strquery = strquery & "("
'strquery = strquery & "'" & txtUserCode.Text & "', "
'strquery = strquery & "'" & txtname.Text & "', "
'strquery = strquery & "'" & txtaddress.Text & "', "
'strquery = strquery & "'" & txtmobile.Text & "', "
'strquery = strquery & "'" & txtusername.Text & "', "
'strquery = strquery & "'" & txtpassword.Text & "', "
'strquery = strquery & "'" & txttype.Text & "', "

'strquery = strquery & ")"


strquery = "INSERT INTO UserInfo (UserCode, " & _
"Name, Address, Mobile, Username, Pwd, Type,) " & _
"Values ('" & txtUserCode.Text & "'," & _
" ' " & txtname.Text & "' , " & _
" ' " & txtaddress.Text & "' , " & _
" ' " & txtmobile.Text & "' , " & _
" ' " & txtusername.Text & "' , " & _
" ' " & txtpassword.Text & "', " & _
" ' " & txttype.Text & "')"


Dim cmd As ADODB.Command
cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandText = strquery
cmd.CommandType = ADODB.CommandTypeEnum.adCmdText

Dim n As Integer
cmd.Execute(n)
If n = 1 Then
breturn = True
u_usercode = txtUserCode.Text
MsgBox("Registration Successful ", vbInformation)
Else
breturn = False
MsgBox("Registration was not Successful", vbInformation)
u_usercode = ""
End If
ERR_RESUME:
cn.Close()
cn = Nothing

Exit Sub
Err_LINE:
breturn = False
MsgBox(Err.Description)
Resume ERR_RESUME





End Sub



syntax error daw...maraming salamat..sorry sa pang novice na tanong ngayun pa lang kasi ako nakabalik sa vb.net ulit at first time ko rin sa msaccess....:)
 
Re: VB.NET Programming Corner! UPDATED!!!

sino po bang may sample jan bawt add, update, edit, and delete using msaccess?...for reference lang sana di ko pa rin kasi ako makalagay nang data using msaccess...anayway ano po bang mali dito


Private Sub BtnRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnRegister.Click

Dim breturn As Boolean
Dim strquery As String

Dim cn As ADODB.Connection
cn = New ADODB.Connection
cn.ConnectionString = kbstrConnectionString
On Error GoTo Err_LINE

cn.Open()
'strquery = "INSERT INTO UserInfo ("
'strquery = strquery & "UserCode, "
'strquery = strquery & "Name, "
'strquery = strquery & "Address, "
'strquery = strquery & "Mobile, "
'strquery = strquery & "Username, "
'strquery = strquery & "Pwd, "
'strquery = strquery & "Type, "
'strquery = strquery & "Tcode, "
'strquery = strquery & ")"
'strquery = strquery & "VALUES "
'strquery = strquery & "("
'strquery = strquery & "'" & txtUserCode.Text & "', "
'strquery = strquery & "'" & txtname.Text & "', "
'strquery = strquery & "'" & txtaddress.Text & "', "
'strquery = strquery & "'" & txtmobile.Text & "', "
'strquery = strquery & "'" & txtusername.Text & "', "
'strquery = strquery & "'" & txtpassword.Text & "', "
'strquery = strquery & "'" & txttype.Text & "', "

'strquery = strquery & ")"


strquery = "INSERT INTO UserInfo (UserCode, " & _
"Name, Address, Mobile, Username, Pwd, Type,) " & _
"Values ('" & txtUserCode.Text & "'," & _
" ' " & txtname.Text & "' , " & _
" ' " & txtaddress.Text & "' , " & _
" ' " & txtmobile.Text & "' , " & _
" ' " & txtusername.Text & "' , " & _
" ' " & txtpassword.Text & "', " & _
" ' " & txttype.Text & "')"


Dim cmd As ADODB.Command
cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandText = strquery
cmd.CommandType = ADODB.CommandTypeEnum.adCmdText

Dim n As Integer
cmd.Execute(n)
If n = 1 Then
breturn = True
u_usercode = txtUserCode.Text
MsgBox("Registration Successful ", vbInformation)
Else
breturn = False
MsgBox("Registration was not Successful", vbInformation)
u_usercode = ""
End If
ERR_RESUME:
cn.Close()
cn = Nothing

Exit Sub
Err_LINE:
breturn = False
MsgBox(Err.Description)
Resume ERR_RESUME





End Sub



syntax error daw...maraming salamat..sorry sa pang novice na tanong ngayun pa lang kasi ako nakabalik sa vb.net ulit at first time ko rin sa msaccess....:)

vb6 yan diba?

anyway for one meron ka mali dito
sobra ang comma mo sa SQL Query
Code:
 strquery = "INSERT INTO UserInfo (UserCode, " & _
       "Name, Address, Mobile, Username, [COLOR="Red"]Pwd, Type,) "[/COLOR] & _
          "Values ('" & txtUserCode.Text & "'," & _
         " ' " & txtname.Text & "' , " & _
        " ' " & txtaddress.Text & "' , " & _
       " ' " & txtmobile.Text & "' , " & _
       " ' " & txtusername.Text & "' , " & _
       " ' " & txtpassword.Text & "', " & _
       " ' " & txttype.Text & "')"

check mo yung vb6/access sample ko
http://www.symbianize.com/showthread.php?t=163979
 
Re: VB.NET Programming Corner! UPDATED!!!

vb6 yan diba?

anyway for one meron ka mali dito
sobra ang comma mo sa SQL Query
Code:
 strquery = "INSERT INTO UserInfo (UserCode, " & _
       "Name, Address, Mobile, Username, [COLOR="Red"]Pwd, Type,) "[/COLOR] & _
          "Values ('" & txtUserCode.Text & "'," & _
         " ' " & txtname.Text & "' , " & _
        " ' " & txtaddress.Text & "' , " & _
       " ' " & txtmobile.Text & "' , " & _
       " ' " & txtusername.Text & "' , " & _
       " ' " & txtpassword.Text & "', " & _
       " ' " & txttype.Text & "')"

check mo yung vb6/access sample ko
http://www.symbianize.com/showthread.php?t=163979



.net po yung gamit ko inaplay ko po yung vb6 sample po..syntax error po daw sa insert into statement..may mga sample po ba kayo sa .net? :) ..maraming salamat po
 
Re: VB.NET Programming Corner! UPDATED!!!

.net po yung gamit ko inaplay ko po yung vb6 sample po..syntax error po daw sa insert into statement..may mga sample po ba kayo sa .net? :) ..maraming salamat po

meron sa first page neto ah, meron din sa first page ng programing section
 
Re: VB.NET Programming Corner! UPDATED!!!

meron sa first page neto ah, meron din sa first page ng programing section


about datagrid at populating data po yun...tanong ko lang po nasanay po kasi ako sa mysql pare pareho rin laang bah ang syntax nito sa dbase?...


wala po kasi akong makitang sample adding..guzto ko po kasing gumawa nnung pangregister....
 
Re: VB.NET Programming Corner! UPDATED!!!

tama po kayo..yung comma lang pala ang mali master eric..pero tanong ko lang po..isang data lang po ang na view ko sa access.. mga limang beses napo akung nakapagregister pero pag yung usercode na hindi lumitaw sa database ang ginamit ko sa pag register duplicate na daw xah? anong mali?..thanks poh
 
Re: VB.NET Programming Corner! UPDATED!!!

tama po kayo..yung comma lang pala ang mali master eric..pero tanong ko lang po..isang data lang po ang na view ko sa access.. mga limang beses napo akung nakapagregister pero pag yung usercode na hindi lumitaw sa database ang ginamit ko sa pag register duplicate na daw xah? anong mali?..thanks poh

check mo constraints at index mo sa database

kung sinabing duplicate, e duplicate nga, open mo access mo at makita ang laman
 
Re: VB.NET Programming Corner! UPDATED!!!

isang laman lang po talaga ang nakita ko...
 
Re: VB.NET Programming Corner! UPDATED!!!

isang laman lang po talaga ang nakita ko...

e di ibig sabihin hindi nag insert
check mo structure ng table mo kung same sila ng ini INSERT mo

palitan mo na yang code mo kung gusto mo ng .NET
use connection object at command object at parameters
 
Re: VB.NET Programming Corner! UPDATED!!!

.net po yung gamit ko inaplay ko po yung vb6 sample po..syntax error po daw sa insert into statement..may mga sample po ba kayo sa .net? :) ..maraming salamat po

hi,

isa magandang mag trap ng error sa sql string, is after ma fill in mo na yung parameter ng sql string "strquery", pwede ka maglagay ng breakpoint at macopy ang final result ng sql string bago pa eto maexecute during debugging, copy the strquery string result at irun mo eto sa sql analyzer para macheck kung working or kung may error, madali sya icorrect


strquery = "INSERT INTO UserInfo (UserCode, " & _
"Name, Address, Mobile, Username, Pwd, Type,) " & _
"Values ('" & txtUserCode.Text & "'," & _
" ' " & txtname.Text & "' , " & _
" ' " & txtaddress.Text & "' , " & _
" ' " & txtmobile.Text & "' , " & _
" ' " & txtusername.Text & "' , " & _
" ' " & txtpassword.Text & "', " & _
" ' " & txttype.Text & "')

dito ka mag add ng breakpoint para makuha ang result ng strquery
 
Re: VB.NET Programming Corner! UPDATED!!!

TS tanong lang may gagawin kasi akong thesis. enough na ba ang visual studio 2010 express for simple vb.net + sql database manipulation? baka kasi mxado marami limit ang 2010 express to confirm
 
Re: VB.NET Programming Corner! UPDATED!!!

sir pwede po ba makahingi ng NAVICAT(GUI) na my kasama ng MySql.. nagdownload na po ako pero error po yung connection.. salamat po need ko self study po ako.. thank you. download link lang po.
 
Re: VB.NET Programming Corner! UPDATED!!!

tulung po nid ko help sa vb net newbie kasi nid ko po nang code...
pag nag search ka dapat ung result nya ay lumabas sa data grid view at dun sa result na nasa datagridview pag clinick nung user ung result dapat mag enable and edit button please help urgent na need ko tlaga tnx :D
 
Re: VB.NET Programming Corner! UPDATED!!!

Public Class Form1

Private Sub BindingSource1_CurrentChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub BtnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAdd.Click
LblAdd_Edit.Text = "Add"
BtnAdd.Enabled = False
BtnSave.Enabled = True
BtnCancel.Enabled = True
BtnEdit.Enabled = False
BtnDelete.Enabled = False
BtnExit.Enabled = False
GroupBox1.Enabled = True
Txtname.Text = ""
TxtAge.Text = ""
TxtSex.Text = ""
Txtname.Focus()
End Sub

Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
DisplayList()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Connection()
End Sub
Sub DisplayList()
Dim lst
ListView1.Items.Clear()
rs = New ADODB.Recordset
With rs
.Open("select * from Info", cn, 2, 3)
Do While Not .EOF
lst = New ListViewItem
lst = ListView1.Items.Add(.Fields("PName").Value)
lst.SubItems.Add(.Fields("Sex").Value)
lst.SubItems.Add(.Fields("Age").Value)
.MoveNext()
Loop


End With

End Sub

Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click
If Txtname.Text = "" Then : MsgBox("DOn't leave space !", MsgBoxStyle.Exclamation) : Txtname.Focus() : Exit Sub : End If
If TxtAge.Text = "" Then : MsgBox("DOn't leave space !", MsgBoxStyle.Exclamation) : TxtAge.Focus() : Exit Sub : End If
If TxtSex.Text = "" Then : MsgBox("DOn't leave space !", MsgBoxStyle.Exclamation) : TxtSex.Focus() : Exit Sub : End If

If MsgBox("Do you want to save this record ?", MsgBoxStyle.YesNo, "Message") = MsgBoxResult.No Then : Exit Sub : End If

rs = New ADODB.Recordset

With rs
If LblAdd_Edit.Text = "Add" Then
.Open("Select * from Info", cn, 2, 3)
.AddNew()
Else
.Open("Select * from Info where Pname='" & Me.Text & "'", cn, 2, 3)
End If
.Fields("Pname").Value = Txtname.Text
.Fields("Sex").Value = TxtSex.Text
.Fields("Age").Value = TxtAge.Text
.Update()
Clear()
End With
DisplayList()
End Sub

Sub Clear()
Txtname.Text = ""
TxtAge.Text = ""
TxtSex.Text = ""

BtnAdd.Enabled = True
BtnSave.Enabled = False
BtnCancel.Enabled = False
BtnEdit.Enabled = True
BtnDelete.Enabled = True
BtnExit.Enabled = True
GroupBox1.Enabled = False
End Sub

Private Sub BtnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCancel.Click
Clear()
End Sub

Private Sub BtnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDelete.Click
If MsgBox("Do you want to delete this record ?", MsgBoxStyle.YesNo, "Message") = MsgBoxResult.No Then : Exit Sub : End If
rs = New ADODB.Recordset
rs.Open("select * from Info where Pname like '" & Me.Text & "'", cn, 2, 3)
rs.Delete()
DisplayList()
End Sub

Private Sub ListView1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseClick
rs = New ADODB.Recordset
With rs
.Open("Select * from Info where Pname like '" & ListView1.FocusedItem.Text & "'", cn, 2, 3)
Txtname.Text = .Fields("Pname").Value
TxtSex.Text = .Fields("Sex").Value
TxtAge.Text = .Fields("Age").Value
End With
End Sub

Private Sub ListView1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListView1.SelectedIndexChanged
Me.Text = ListView1.FocusedItem.Text
End Sub

Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click
Me.Close()
End Sub

Private Sub BtnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEdit.Click
Me.Text = ListView1.FocusedItem.Text
LblAdd_Edit.Text = "Edit"
BtnAdd.Enabled = False
BtnSave.Enabled = True
BtnCancel.Enabled = True
BtnEdit.Enabled = False
BtnDelete.Enabled = False
BtnExit.Enabled = False
GroupBox1.Enabled = True
Txtname.Focus()
End Sub
End Class


pde po pa convert sa mysql?? di ko kasi gets kung anu ung recordset jan tnx :D
 
Back
Top Bottom