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!

Mga master paturo nmn ako nung dev express . kasi hnd ko mapalabas ung isang form pag ka click ko ng button. thank you.
 


pa help naman po sa connection between server and client ...im making internet cafe management system like handy cafe beginner lang po ako kya medyo d hiyang sa mga gngmt about server/client relationship vb.net po salamat po
 
Pa help about dynamic connection string.

I have this code

Code:
        My.Settings.server = darServer.Text
        My.Settings.username = darUsername.Text
        My.Settings.password = darPassword.Text
        My.Settings.dbname = darName.Text
        My.Settings.Save()
        MessageBox.Show("Database setting save!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
        ConnectDatabase()        
        Me.Hide()

Working naman po sya , my problem is pano ma reset ata yung connection, I mean If input like the info below the INVALID one, ofcourse mag eeror, then If i'll enter the VALID one still error parin sya, I need to rerun or debug the system again to work, I'll input the VALID one, then saka magwowork >.< . Please :help:

What's the best solution po para no need to rerun or debug the system,

- INVALID -
Server = localhost
Username= root
Password = blahhblahh
DBName = db_sample

- VALID -
Server = localhost
Username= root
Password = myPassword
DBName = db_sample
 
Last edited:
Pa help about dynamic connection string.

I have this code

Code:
        My.Settings.server = darServer.Text
        My.Settings.username = darUsername.Text
        My.Settings.password = darPassword.Text
        My.Settings.dbname = darName.Text
        My.Settings.Save()
        MessageBox.Show("Database setting save!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information)
        ConnectDatabase()        
        Me.Hide()



Working naman po sya , my problem is pano ma reset ata yung connection, I mean If input like the info below the INVALID one, ofcourse mag eeror, then If i'll enter the VALID one still error parin sya, I need to rerun or debug the system again to work, I'll input the VALID one, then saka magwowork >.< . Please :help:

What's the best solution po para no need to rerun or debug the system,

- INVALID -
Server = localhost
Username= root
Password = blahhblahh
DBName = db_sample

- VALID -
Server = localhost
Username= root
Password = myPassword
DBName = db_sample

Please post your code in ConnectDatabase()
 
Please post your code in ConnectDatabase()

Heto po sir ,

Code:
Imports MySql.Data.MySqlClient
Module modConnect

    Public CNN As New MySqlConnection
    Public cnString As String = "SERVER = '" & My.Settings.server & "'; USERID = '" & My.Settings.username & "'; PASSWORD = '" & My.Settings.password & "'; DATABASE = '" & My.Settings.dbname & "'; "
    Public da As New MySqlDataAdapter
    Public cmd As New MySqlCommand
    Public dr As MySqlDataReader
    Public cmb As MySqlCommandBuilder

    Public DataTable As New DataTable
    'Public DataSet As New DataSet
    Public DataSet As DataSet = New DataSet


    Public Sub ConnectDatabase()
        Try
            If CNN.State = ConnectionState.Closed Then
                CNN.ConnectionString = cnString
                CNN.Open()
            End If
        Catch ex As Exception
            'MsgBox("Please check your database configuration", MsgBoxStyle.Exclamation, "Message")
            MsgBox(ex.Message.ToString, MsgBoxStyle.Critical, "Message")
        End Try

    End Sub

End Module
 
Heto po sir ,

Code:
Imports MySql.Data.MySqlClient
Module modConnect

    Public CNN As New MySqlConnection
    Public cnString As String = "SERVER = '" & My.Settings.server & "'; USERID = '" & My.Settings.username & "'; PASSWORD = '" & My.Settings.password & "'; DATABASE = '" & My.Settings.dbname & "'; "
    Public da As New MySqlDataAdapter
    Public cmd As New MySqlCommand
    Public dr As MySqlDataReader
    Public cmb As MySqlCommandBuilder

    Public DataTable As New DataTable
    'Public DataSet As New DataSet
    Public DataSet As DataSet = New DataSet


    Public Sub ConnectDatabase()
        Try
            If CNN.State = ConnectionState.Closed Then
                CNN.ConnectionString = cnString
                CNN.Open()
            End If
        Catch ex As Exception
            'MsgBox("Please check your database configuration", MsgBoxStyle.Exclamation, "Message")
            MsgBox(ex.Message.ToString, MsgBoxStyle.Critical, "Message")
        End Try

    End Sub

End Module

So ganun pala, once lang ma-assign ang cnString.
Try mo kaya, yung declaration mo sa taas na...
Code:
Public cnString As String ="SERVER = '" & My.Settings.server & "'; USERID = '" & My.Settings.username & "'; PASSWORD = '" & My.Settings.password & "'; DATABASE = '" & My.Settings.dbname & "'; "

gawin mo na lang...
Code:
Public cnString As String

Dun sa ConnectDatabase mo, dun mo na lang initialize ang variable mo na cnString before mo i-open ang connection, para laging latest value ang nakukuha nya sa settings mo.

Code:
cnString String ="SERVER = " & My.Settings.server & "; USERID = " & My.Settings.username & "; PASSWORD = " & My.Settings.password & "; DATABASE = " & My.Settings.dbname & ";"

BTW, pwede namang walang single quotation sa Connection String mo.
 
Last edited:
Pano po ba mag create or mag add ng another column for another set of data using vb language? tia
 
So ganun pala, once lang ma-assign ang cnString.
Try mo kaya, yung declaration mo sa taas na...
Code:
Public cnString As String ="SERVER = '" & My.Settings.server & "'; USERID = '" & My.Settings.username & "'; PASSWORD = '" & My.Settings.password & "'; DATABASE = '" & My.Settings.dbname & "'; "

gawin mo na lang...
Code:
Public cnString As String

Dun sa ConnectDatabase mo, dun mo na lang initialize ang variable mo na cnString before mo i-open ang connection, para laging latest value ang nakukuha nya sa settings mo.

Code:
cnString String ="SERVER = " & My.Settings.server & "; USERID = " & My.Settings.username & "; PASSWORD = " & My.Settings.password & "; DATABASE = " & My.Settings.dbname & ";"

BTW, pwede namang walang single quotation sa Connection String mo.

Thank you sir , working po sya :thumbsup:

Galing :D
 
Last edited:
Mga sir pahelp po. may item ako sa ibang form tas nag add cart ako,dpat po mag add yung item jan sa form na yan. ty.
-ORDERING SYSTEM
-vbOOP
-pang desktop app lang. (DI ONLINE)
250032a.png
 
Last edited:
Guys, tanong lang ko :)

Pano ganito? I mean the left side (orange part)

What tools do you think ang gamit? Curious lang ako, di ko kasi makuha :3

Please :help: suggestions . .

Panel ba parent nito? Saka when clicking New product or products categories, pano white ang backgroud

10407563_712367568799693_69883571872551215_n.jpg


Another sample, Gusto ko sanang gumawa ng ganito the left side part :3

10488068_1447262568876144_6305605155865925691_n.jpg
 
Last edited:
mga boss pa help naman baguhan lang po sa VB.

View attachment 181469

gawan lng sana ito ng program

2 forms po sana yung isa is finding the number "123" at ma total yung number of bets at ma input yung "limit" sample is 10 at yung "thrown" ay subra nya


at yung isa is adding gusto q po sana is tatlo jan is 123 at ma a-add nlang yung bets nya no need to input 123 since meron na yung bets nlang nya ma a-add which is 15 lahat.

connect sana sa MS access. .

tulong po mga bossing d q pa mkuha kc. .
 

Attachments

  • 122.jpg
    122.jpg
    19 KB · Views: 7
  • 122.jpg
    122.jpg
    251.7 KB · Views: 11
Last edited:
Guys, tanong lang ko :)

Pano ganito? I mean the left side (orange part)

What tools do you think ang gamit? Curious lang ako, di ko kasi makuha :3

Please :help: suggestions . .

Panel ba parent nito? Saka when clicking New product or products categories, pano white ang backgroud

https://fbcdn-sphotos-d-a.akamaihd....07563_712367568799693_69883571872551215_n.jpg

Another sample, Gusto ko sanang gumawa ng ganito the left side part :3

https://fbcdn-sphotos-g-a.akamaihd....68_1447262568876144_6305605155865925691_n.jpg

Tab Control yan, sa DevExpress magaganda yung mga design nila sa Tab Controls nila.
Kaso, may bayad yung DevExpress, so ang ginagawa ng iba, gumagawa sila ng sarili nilang User Control.
 
Pahelp naman pu about sa vb.net
eto pu dapat mangyari:
Name fields must not accept ‘spaces’ at the beginning of the input.
Name fields should auto-capitalize on the first letter.
Characters must auto-capitalize after pressing space.
 
Pahelp naman pu about sa vb.net
eto pu dapat mangyari:
Name fields must not accept ‘spaces’ at the beginning of the input.
Name fields should auto-capitalize on the first letter.
Characters must auto-capitalize after pressing space.

dun sa must not accept spaces gamitan mo lang ng ASCII yan! check mo yung ASCII number ng space kay google
sa auto-capitalize naman sa first letter.. ng bawat word ba ito or what? kasi pwede ka gumamit ng SUBSTRING or INDEXOF
sa capitalize naman after pressing space.. gamitin mo naman yung ganito halimbawa..

txtName.text.substring(" ", 1).toUppercase <----- meaning yung " " after nun may 1 kasi yung first character after ng space gagawin niyang uppercase kaya may toUppercase
 
dun sa must not accept spaces gamitan mo lang ng ASCII yan! check mo yung ASCII number ng space kay google
sa auto-capitalize naman sa first letter.. ng bawat word ba ito or what? kasi pwede ka gumamit ng SUBSTRING or INDEXOF
sa capitalize naman after pressing space.. gamitin mo naman yung ganito halimbawa..

txtName.text.substring(" ", 1).toUppercase <----- meaning yung " " after nun may 1 kasi yung first character after ng space gagawin niyang uppercase kaya may toUppercase

boss error pu.
View attachment 181739

ang dapat pu kasi mangyari, sa loob pu ng textbox kapag nag-input ka ng word then every time pu na pinipindot pu yung space mag auto-capitalize yung first letter ng every word.
 

Attachments

  • Screenshot (6).png
    Screenshot (6).png
    54.5 KB · Views: 9
Back
Top Bottom