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!

Sino po nakakaalam kung san tumatambay na forum ngaun si sir T.S Ericmejia..Salamat
 
Panu paganahin yung backspace nito

Code:
  Private Sub FirstnameValue_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles FirstnameValue.KeyPress
        If Asc(e.KeyChar) < 65 Or Asc(e.KeyChar) > 90 And Asc(e.KeyChar) > 122 AndAlso Not IsNumeric(e.KeyChar) Then
            e.Handled = True
        End If
 
Mga bosing, patolong naman. :) gamit ko visual studio 2012, sa report crystal report.
yung problima ko, ay yung pag change ng paper size ng report, ayaw nya kasing magchange during runtime.
kung meron may alam, tulong naman mga bosing. pls pls. :) :) thnx.
 
Sino po may simple na atm card na program jan pa share naman po? Thank you guys :D
 
Panu paganahin yung backspace nito

Code:
  Private Sub FirstnameValue_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles FirstnameValue.KeyPress
        If Asc(e.KeyChar) < 65 Or Asc(e.KeyChar) > 90 And Asc(e.KeyChar) > 122 AndAlso Not IsNumeric(e.KeyChar) Then
            e.Handled = True
        End If

search mo po sa google sir yung ascci code nung backspace then add mo jan

- - - Updated - - -

Good Day mga Sir/Ma'am,

Patulong po ayaw po kasi magupdate sa database eto po code ko.
minsan lang sya gumana.

Private Sub ToolStripButton2_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton2.Click
Try

conn.Open()
If TxtLName.Text = "" Or TxtFName.Text = "" Or TxtMI.Text = "" Or CbGender.Text = "" Or CbStatus.Text = "" Or TxtAddress.Text = "" Then
MsgBox(" Please Fill all the blank field")
ElseIf DTPBirth.Value = Date.Now Or Val(TxtAge.Text) <= 10 Then
MsgBox("Kindly Double Check the Date of Birth")
Else
cmd.CommandText = "Update tblPerInfo set LastName='" & TxtLName.Text & "',FirstName='" & TxtFName.Text & "',MI='" & TxtMI.Text & "',Gender='" & CbGender.Text & "',Status='" & CbStatus.Text & "',YearOfBirth='" & DTPBirth.Text & "',Age='" & TxtAge.Text & "',Address='" & TxtAddress.Text & "' where ID = " & i & ""
cmd.ExecuteNonQuery()

MsgBox("One Record Updated")
' ToolStripButton2.Enabled = False
linis()
End If

Catch ex As Exception
MsgBox(ex.Message)
End Try

RetriveFiles()
End Sub
Private Sub DataGridView1_CellMouseDoubleClick(sender As Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseDoubleClick


i = DataGridView1.CurrentRow.Index
Me.TxtLName.Text = DataGridView1.Item(1, i).Value
Me.TxtFName.Text = DataGridView1.Item(2, i).Value
Me.TxtMI.Text = DataGridView1.Item(3, i).Value
Me.CbGender.Text = DataGridView1.Item(4, i).Value
Me.TxtAge.Text = DataGridView1.Item(5, i).Value
Me.DTPBirth.Value = DataGridView1.Item(6, i).Value
Me.CbStatus.Text = DataGridView1.Item(7, i).Value
Me.TxtAddress.Text = DataGridView1.Item(8, i).Value
'ToolStripButton2.Enabled = True
End Sub

ano po kaya kulang o mali ko?

Thanks po
 
Hi guys;

Pa tulong naman kung anong Connection ang ilalagay ko gusto ko m access sya ng ibang computer kasi ung connection ko pnag localhost lang.
eto po yung code ko.

Try
If conn.State = ConnectionState.Closed Then
conn = New SqlConnection("Initial Catalog="database name";Server=" + pc name + "\SQLEXPRESS;Data Source=localhost;Integrated Security=SSPI;")
conn.Open()
End If
Catch myerror As Exception
MessageBox.Show("Error Connecting to the Database", "Error Database Server", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End
End Try

Salamat po sa tulong nyo... :D
 
Last edited:
I made this thread for all programmers starting their adventure in VB.NET.

Please post relevant and sensible questions regarding VB.NET,
share your knowledge and expertise, share codes and techniques.

Post question on HOW TOs:
How to do this or that, ill supply bits of code to accomplish basic tasks.

Ill be posting series of samples leading to complete applications,
your suggestions are encouraged.
These samples will contain codes relevant to other tasks as well.

Platform = VS2003 to VS2012

i suggest learn and get the feel of VB.NET/VISUAL STUDIO IDE first before posting questions,
so that we can talk on the same page.


Topics:
VB.NET Winforms (not Web Applications)
ADO.NET as applied in VB.NET
Crystal Reports on VB.NET
SQLServer as used in VB.NET
MSAccess as used in VB.NET
Classes
UserControls

Technologies:
Serial - like using SMS, Barcode and other hardware
TCP/IP - chat applications, sockets, internet applications
MSMQ - message queuing
Remoting - executing assemblies in other computer
WebServices - using webservices in windows forms
Multithreading - executing more than 1 process at the same time


Suggested Third Party Tools:
DevXPress 2009 Free Edition
SQLServer 2005 Express Edition

Suggested references:
http://www.homeandlearn.co.uk/net/vbnet.html
http://www.java2s.com/Tutorial/VB/CatalogVB.htm

I currently use Visual Studio 2008 only, but basic codes will apply to all versions

Please do not ask for a complete system,
instead use the codes and assistance that you will find here
to build your own system.


***Thanks to moderators, STICKY na ang thread!

Lets share knowledge so that we can be a more flexible and well rounded programmer. Be it for school or work.

Links:

First Post: Populating DataGridView using MSAccess Database
Second Post : Basic VB.NET MSAccess Tutorial
SQLServer Sample


Sir patulong po ng pag design ko ng database para makagawa ng Grading System . Salamat poo
 
Hi sa mga Programmers!


Ask ko lang po sana paano ko po ba maaachieve yung ganito kahit idea lng.. Thx

Nais ko sana na mag execute ng sql query na nakadepende sa pinili kog Database..
Sabihin natin nasa combobox si list of Dabase tapos kapag mag iinsert ako ng data dapat dun nya un ieexecute..
 
Hi sa mga Programmers!


Ask ko lang po sana paano ko po ba maaachieve yung ganito kahit idea lng.. Thx

Nais ko sana na mag execute ng sql query na nakadepende sa pinili kog Database..
Sabihin natin nasa combobox si list of Dabase tapos kapag mag iinsert ako ng data dapat dun nya un ieexecute..

kada pili mo ng database pipili ka din ng table? di ko makita logic kung bakit
 
Hi guys;

bago lang ako po dito eto mga group ang hinahanap ko po. Ano po ba yung connection ang gagawin kung gusto ko i-connect ang sofware sa ibang pc. Eto po ang Connection ko gamit ko po ang Vb.net 2012 at SQL server 2005.

conn = New SqlConnection
Try
If conn.State = ConnectionState.Closed Then

conn = New SqlConnection("Initial Catalog=DBName;Server=" + pc Name + "\SQLEXPRESS;Data Source=localhost;Integrated Security=SSPI;")
conn.Open()
End If
Catch myerror As Exception
MessageBox.Show("Error Connecting to the Database", "Error Database Server", _
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End
End Try

' thanks po sa tulong nyo.. :);)
 
Back
Top Bottom