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!

:help:

Hello sa mga master ng programming dito. May itatanong lang po ako. THesis kase nmen ngayon. at nailagay namen s approved proposal namen ang ggmtn namen ay Visual studio 2012 and MSQL 2014 ung backend namen. meron pa ba kong need na idownload like a compiler kung kelangan man. what else po kaya need ko idownload para mapagana namen ung sales and inventory system namen..

Advance salamat sa stock knowledge nyo. :thumbsup:

Reporting tools para sa report generation. Gamit ko ngayon sa thesis project namin ay Crystal Report. Para pandagdag sa UI Design, Bunifu (not free) or Metro Framework. Parehas din tayo ng thesis project. POS and Inventory samin ng mga kagrupo ko. Goodluck sa atin at sa mga kagrupo natin, sir! God Bless!
 
Bukod po sa showdialog(), may paraan pa po ba para naka-lock lang ang user sa isang form after niya ito i-open?

Maraming salamat po!
 
Paano po mag delete ng data sa sql server 2012.. sample lng mga master. salamat
for soft.eng project.


gamit ko vs 2012
 
Last edited:
guys pano ko to maayos may nalabas na error conversion from string "position" to type 'Integer' is not valid sql server 2012 gamit ko eto po code

Dim conn As SqlConnection

Dim cmd As New SqlCommand
conn = New SqlConnection
conn.ConnectionString = "Data Source=LMYKIRA-PC\HELPDESKSVR;Initial Catalog=helpdesk;Persist Security Info=True;User ID=sa;Password=Sa2018"
Dim Reader As SqlDataReader
Try
conn.Open()
Dim query As String
query = "select position from accounttbl where username= '" & username.Text & "' and password = '" & password.Text & "'"
cmd = New SqlCommand(query, conn)
Reader = cmd.ExecuteReader

Dim count As Integer
count = 0
While Reader.Read
count = count + 1
End While

If count = 1 Then

Dim usertype = Reader.GetString("position")
If usertype = "Admin" Then
Admin.Show()
Me.Hide()
conn.Close()
conn.Dispose()

ElseIf usertype = "Employee" Then
Employee.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "Technician" Then
Technician.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "HR" Then
HR.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "IR Supervisor" Then
ItSupervisor.Show()
Me.Hide()
conn.Close()
conn.Dispose()
End If
Else
MsgBox("User does not exist!", vbCritical)
username.Text = ""
password.Text = ""
End If

conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally

username.Text = ""
password.Text = ""
End Try
 
Palagay ko sa query mo yan double check mo ung mga double qoute mo.
 
may pag kakaiba ba si MySql Workbench sa Xamp ?

explained niyo naman kahit sa "scratch" :lol:


teka teka,

same lang ba si xampp and Workbench ?

follow up question,

I am using Visual Studio 2010

If gagawa po ako ng system for office, halimbawa (Daily activity system, basta mga ganyan)

ano po ang dabest ko na database ang gamitin ?

kapag ba na publish na yung system hindi na niya need ng database na ginawa mo ? tama ba ang logic na naiisip ko ?

- - - Updated - - -

Unti unti ko na natutuklasan ang misteryo ni VB

kapag gumagawa ako ng connection between visual studio 2010 and my sql bench

"access denied for user 'root'@'localhost' (using password yes)"

Hindi ko alam ang password , pinamana lang saken kung baga yung workbench

Kapag in-ALTER ko yung password using the solution na nasa website ng workbench

Madadamay ba yung ibang existing na connection ?
 
Last edited:
guys pano ko to maayos may nalabas na error conversion from string "position" to type 'Integer' is not valid sql server 2012 gamit ko eto po code

Dim conn As SqlConnection

Dim cmd As New SqlCommand
conn = New SqlConnection
conn.ConnectionString = "Data Source=LMYKIRA-PC\HELPDESKSVR;Initial Catalog=helpdesk;Persist Security Info=True;User ID=sa;Password=Sa2018"
Dim Reader As SqlDataReader
Try
conn.Open()
Dim query As String
query = "select position from accounttbl where username= '" & username.Text & "' and password = '" & password.Text & "'"
cmd = New SqlCommand(query, conn)
Reader = cmd.ExecuteReader

Dim count As Integer
count = 0
While Reader.Read
count = count + 1
End While

If count = 1 Then

Dim usertype = Reader.GetString("position")
If usertype = "Admin" Then
Admin.Show()
Me.Hide()
conn.Close()
conn.Dispose()

ElseIf usertype = "Employee" Then
Employee.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "Technician" Then
Technician.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "HR" Then
HR.Show()
Me.Hide()
conn.Close()
conn.Dispose()
ElseIf usertype = "IR Supervisor" Then
ItSupervisor.Show()
Me.Hide()
conn.Close()
conn.Dispose()
End If
Else
MsgBox("User does not exist!", vbCritical)
username.Text = ""
password.Text = ""
End If

conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally

username.Text = ""
password.Text = ""
End Try


Check mo data type ng position mo if varchar or int.. if int..palitan mo ng varchar okay nmn query mo eh

- - - Updated - - -

may pag kakaiba ba si MySql Workbench sa Xamp ?

explained niyo naman kahit sa "scratch" :lol:


teka teka,

same lang ba si xampp and Workbench ?

"Magkaiba ang laki ng pnagkaiba nung dalawa.. kng hindi k nmn mg wweb mas advisable n workbench n lng mas madali pang gmitin"

follow up question,

I am using Visual Studio 2010

If gagawa po ako ng system for office, halimbawa (Daily activity system, basta mga ganyan)

ano po ang dabest ko na database ang gamitin ?
"if small company lang ay pde na ang ms access but if more than 100 employees kayo much better used sql server or u can used also mysql kng san ka mas nadadalian although same lang sya halos ng syntax.."

kapag ba na publish na yung system hindi na niya need ng database na ginawa mo ? tama ba ang logic na naiisip ko ?

"What do you mean by publish ? pag ba iddeploy na? if Need mo n ideploy u need to create an installer for that or .exe file gmit k ng tools.. then pde mo n din iinclude dun db mo pra di hassle mg install."

- - - Updated - - -

Unti unti ko na natutuklasan ang misteryo ni VB

kapag gumagawa ako ng connection between visual studio 2010 and my sql bench

"access denied for user 'root'@'localhost' (using password yes)"

Hindi ko alam ang password , pinamana lang saken kung baga yung workbench

Kapag in-ALTER ko yung password using the solution na nasa website ng workbench

Madadamay ba yung ibang existing na connection ?

"hindi nmn as long as bbguhin mo din ung password sa connection string mo ng database"
 
Last edited:
Public Class Form1
Dim ServerString As String = "Server=localhost; User Id=root;Password=root; Database=newdb"
Dim SQLConnection As MySqlConnection = New MySqlConnection


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SQLConnection.ConnectionString = ServerString

Try
If SQLConnection.State = ConnectionState.Closed Then
SQLConnection.Open()
MsgBox("Successfully Connected to MySQL Database")
Else
SQLConnection.Close()
MsgBox("Connection is Closed")
End If
Catch ex As Exception
MsgBox(ex.ToString)

End Try
End Sub

Sir pa explain na naman po ng function po mga naka color red :) TIA
 
Public Class Form1
Dim ServerString As String = "Server=localhost; User Id=root;Password=root; Database=newdb"
Dim SQLConnection As MySqlConnection = New MySqlConnection


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SQLConnection.ConnectionString = ServerString

Try
If SQLConnection.State = ConnectionState.Closed Then
SQLConnection.Open()
MsgBox("Successfully Connected to MySQL Database")
Else
SQLConnection.Close()
MsgBox("Connection is Closed")
End If
Catch ex As Exception
MsgBox(ex.ToString)

End Try
End Sub

Sir pa explain na naman po ng function po mga naka color red :) TIA

Makikita mo lahat yan sa object browser ng Visual Studio (Ctrl + Alt + J).
Para makapag-operate ka ng database, kailangan mo ng tatlong class:
1. Connection. => para makaconnect sa database
2. Command. => para magawa ang SQL statement.
3. DataReader. => para mailagay sa variable ang anumang makuhang data sa database.
4. DataAdapter => kung gusto mong gumawa ng table GUI sa application mo.

Ung Connection class ay nakadepende sa data provider o sa database application.
Class OleDbConnection = MSAccess, etc
Class SqlConnection = MS SQL Server, etc
Class MySqlConnection = MySql Server, etc

Para makaconnect ka sa database:
1. Kailangan malaman mo ang ConnectionString o Profile ng database application. Ito'y nahahati sa tatlo depende sa data provider: Server=localhost (pangalan ng server), User Id=root;Password=root (Database account), at Database=newdb" (pangalan ng database).
Halimbawa:
Dim ServerString As String = "Server=localhost; User Id=root;Password=root; Database=newdb"

2. Kailangan mo na syang ilagay sa Constructor ng class MySqlConnection.
Halimbawa: Dim SQLConnection As MySqlConnection = New MySqlConnection(ServerString)[/COLOR]
Kung hindi mo nilagay sa constructor ang ConnectionString, pwede mong ilagay sa property-ConnectionString kagaya ng ginawa mo.
Halimbawa:
Dim ServerString As String = "Server=localhost; User Id=root;Password=root; Database=newdb"
Dim SQLConnection As MySqlConnection = New MySqlConnection()

SQLConnection.ConnectionString = ServerString

https://dev.mysql.com/doc/dev/connector-net/8.0/html/N_MySql_Data_MySqlClient.htm
 
Last edited:
Thanks Sir gulong gulo ako na hindi ko alama ng uunahin ko work + vb.net (ok na ako sa tech support e kaso pag aralan ko daw ang vb:slap:)

Thanks Sir sa pag break down.
ang ginagawa ko sinesearch ko isa isa
 
VB.net progress

Marunong na ako mag-create ng (schema)database at table sa MySqlWorkbench
Insert ng data manually sa loob ng table
Checking the connection between form and database
Login Form with database

may progress kahit paano :lol:
 
TS tanong ko lang po kung may TUT about kung pano mag export ng excel file from vb 2008 gamit ang MySQL na database salamat in advance for capstone use.
 
TS tanong ko lang po kung may TUT about kung pano mag export ng excel file from vb 2008 gamit ang MySQL na database salamat in advance for capstone use.

consider yan as object.
Search topic aboutt serialization at paano gamitin ang CRUDE sa mga binary data.
 
TS tanong ko lang po kung may TUT about kung pano mag export ng excel file from vb 2008 gamit ang MySQL na database salamat in advance for capstone use.

sir try mo ung closexml.
un ang gamit ko pang import export ng excel
 
MysqlConn = New MySqlConnection
MysqlConn.ConnectionString = "server=localhost;username=root;password=root;database=displayinfob2d"
Dim SDA As New MySqlDataAdapter
Dim dbDataSet As New DataTable
Dim bSource As New BindingSource

Try
MysqlConn.Open()
Dim Query As String
Query = "select * from displayinfob2d.infotb1 where DOB Between '" & DateTimePicker1.Text & "' And '" & DateTimePicker2.Text & "'"

Command = New MySqlCommand(Query, MysqlConn)
SDA.SelectCommand = Command

SDA.Fill(dbDataSet)
bSource.DataSource = dbDataSet
DataGridView1.DataSource = bSource
SDA.Update(dbDataSet)


MysqlConn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
MysqlConn.Dispose()
End Try

End Sub

pa breakdown naman idol yung naka red


may ibang way ba ng pag fifll ng data sa datagrid ? I mean yung collection ?

Kase yan nasa taas ang gamit mo eh hindi gumagana ang code ko na pag coconvert ng date yyyy-MM-dd to dd-MM-yyyy

- - - Updated - - -

^ solved !

nakakatuwa naman nakagawa ko na ang aking first system "Daily Report"!

kahit hindi gaano ito ka complex still napatunayan ko na tamad lang pala ako mag program noon ! :beat:
 
Paano ang structure ng login as admin at as user ?

Pinaliwanag saken ni ng isang IT dito (php guy) na gagawa ako ng dalawang table for user and admin, admin for admin form and user for multiple user form.

Magkasama ba ang data ni admin at user sa iisang databse table?
Gagawa pa ba ako ng database table ulit para sa multiple user? siguro haha d kasi ako sure
mag lalagay siguro ako ng ID para sa User tapos yung ang mamatch nlang sa database table and na nag lalaman ng mga info nila then didisplay sa datagrid. (dito ako mahihirapan na part)

Ano ba ang mas preferred niyo malaya niyo makikita ang activities(Time,Date at Actitivies lang ang laman ng datagridview) ng iba (mag lalagay ng combox o listbox o datadridview, nakalagay ang names(userdi)) o pag log in ng user , user form lang ang lalabas.

Ang dami dami ko naiisip pero ang totoo hindi ko alam ang syntax niyan :lol:
 
good day po!

ask lang po ako kung pupuwede po ba akong magpagawa ng program...please contact me in this number 09085718606..
salamat po!
 
Back
Top Bottom