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!

may nka try ba sa inyo mag search sa sql db by word?? halimbawa, pag mag save tayo na "the quick brown fox" sa db, tpos e-search natin sa lahat na column ang may word na "brown".. possible ba?
 
may nka try ba sa inyo mag search sa sql db by word?? halimbawa, pag mag save tayo na "the quick brown fox" sa db, tpos e-search natin sa lahat na column ang may word na "brown".. possible ba?


pwd boss E WHERE mo lahat ng Fields ng Table at LIKE

ex.
WHERE FirstName LIKE "%Mark%" AND LastName LIKE "%Mark%"
 
Same lang po ba ang codes for datagrid using access to mysql?
If not, pwede penge ng sample code
Populating DataGridView using MySQL?
 
Same lang po ba ang codes for datagrid using access to mysql?
If not, pwede penge ng sample code
Populating DataGridView using MySQL?

same lng po...some query syntax lng...

ask ko lang po kung pano gawin ung date format using 3 combo boxes with leaf year po sya

hehehe LEAF YEAR

why not use datetimeFicker?:thumbsup:
kung combobox parin gusto mo do it like this
Code:
dim date as string
date=string.format("{0}/{1}/{2}",cmbDay.text,cmbmonth.text,cmbyear.text)

pero suggest ko na lng datetime picker
 
Pahelp naman po :help:

Reloading DataSource of my Datagridview.

Newbie Here!

I made some changes in my MS Access Tables like deleting a row and tried to update my populated DataGridView tables as well.

I tried using:

DataGridView1.Refresh()

is has no effect

Ive been searching codes for this, but all I get is codes for refreshing database changes that has been made through datagridview. (vise versa)

Im using VisualStudio2012 and I didnt populated my datagridview programmatically I just used the DataGridView Task then choose my Data Source and so on.
I also tried refreshing my Data Connections manually in Server Explorer View but still no effect.

Is there some codes for that? If yes. Can my progmam still use those codes despite I didnt load my database programmatically.

here are the only codes in my form.

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

'TODO: This line of code loads data into the 'FullNameDataSet.ContactNumber' table. You can move, or remove it, as needed.
Me.ContactNumberTableAdapter.Fill(Me.FullNameDataSet.ContactNumber)

'TODO: This line of code loads data into the 'FullNameDataSet.Course' table. You can move, or remove it, as needed.
Me.CourseTableAdapter.Fill(Me.FullNameDataSet.Course)

'TODO: This line of code loads data into the 'FullNameDataSet.FullNameTable' table. You can move, or remove it, as needed.
Me.FullNameTableTableAdapter.Fill(Me.FullNameDataSet.FullNameTable)

End Sub


Thanks in advance! :salute:
 
I'm making hotel reservation and pa help naman pano gawing ung Weekly/Monthly Reports ?

Penge sample query kahit sa weekly lang.

I'm using DateTimePicker with a custom format yyyy/mm/dd hh:mm
 
Last edited:
mga sir patulong naman po.... noob lang po sa vb....

need ko po ng code regarding dito.. (2 textbox po gamit) If/ElseIf daw po gamit...

Temperature Label
Temp<0 ICE
Temp bet. 0 and 100 WATER
Temp >100 Stream


eto po code ngawa ko walang error pero lumalabas po ito...

Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text <= 0 Then
TextBox2.Text = "ICE"
ElseIf TextBox1.Text <= 100 Then
TextBox2.Text = "WATER"
Else
TextBox2.Text = "STREAM"

End If
End Sub
End Class


InvalidCastException was unhandled
Conversion from string "" to type 'Double' is not valid.
Make sure the source type is convertible to the destination type...


pahelp naman po.....
:help:
 
Last edited:
Pahelp naman po :help:

Reloading DataSource of my Datagridview.

Newbie Here!

I made some changes in my MS Access Tables like deleting a row and tried to update my populated DataGridView tables as well.

I tried using:

DataGridView1.Refresh()

is has no effect

Ive been searching codes for this, but all I get is codes for refreshing database changes that has been made through datagridview. (vise versa)

Im using VisualStudio2012 and I didnt populated my datagridview programmatically I just used the DataGridView Task then choose my Data Source and so on.
I also tried refreshing my Data Connections manually in Server Explorer View but still no effect.

Is there some codes for that? If yes. Can my progmam still use those codes despite I didnt load my database programmatically.

here are the only codes in my form.

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

'TODO: This line of code loads data into the 'FullNameDataSet.ContactNumber' table. You can move, or remove it, as needed.
Me.ContactNumberTableAdapter.Fill(Me.FullNameDataSet.ContactNumber)

'TODO: This line of code loads data into the 'FullNameDataSet.Course' table. You can move, or remove it, as needed.
Me.CourseTableAdapter.Fill(Me.FullNameDataSet.Course)

'TODO: This line of code loads data into the 'FullNameDataSet.FullNameTable' table. You can move, or remove it, as needed.
Me.FullNameTableTableAdapter.Fill(Me.FullNameDataSet.FullNameTable)

End Sub


Thanks in advance! :salute:

simply create a method/function so that you can call that method/function to reload the datagrid..
example:
Code:
sub loadData()
'populate grid
end sub
sub delete()
'after delete
'call kloadData
end sub
 
mga sir patulong naman po.... noob lang po sa vb....

need ko po ng code regarding dito.. (2 textbox po gamit) If/ElseIf daw po gamit...

Temperature Label
Temp<0 ICE
Temp bet. 0 and 100 WATER
Temp >100 Stream


eto po code ngawa ko walang error pero lumalabas po ito...

Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text <= 0 Then
TextBox2.Text = "ICE"
ElseIf TextBox1.Text <= 100 Then
TextBox2.Text = "WATER"
Else
TextBox2.Text = "STREAM"

End If
End Sub
End Class


InvalidCastException was unhandled
Conversion from string "" to type 'Double' is not valid.
Make sure the source type is convertible to the destination type...


pahelp naman po.....
:help:

convert/parse mo muna ung laman ng textbox
Code:
dim myVal as integer=cInt(textbox1.text)
 
Last edited:
sir eric, regarding po sa microPOS niyo, ask ko lang po pano niyo po nagawang component yung panecaption at datatoolbar?saka po yung mga form na ginawa niyo?gusto ko po kasi sana matutunan. papaalam na din po ako na ibabase ko po sa POS niyo yung design na gagawin ko sa POS na gagawin ko. design lang po master, :thanks: in advance master..
 
ask ko lang po sana baka po alam nyo kung pano makapag add, edit,delete ng data sa vb.net na connected sa ms sql.? thanks po

gamit ka sqlcommand

sa commandtext property lagay mo query

for add : "INSERT INTO table_name (field_name_1,field_name_2) VALUES ('field_1_value', 'field_2_value');"

for edit : "UPDATE table_name SET field_name_1 = 'field_1_value' WHERE field_name_2 like 'field_query'"

for delete : "DELETE FROM table_name WHERE field_name_1 like 'field_query'"
 
:yipee:SA MGA GUSTO SUMALI here ang link http://ph.ipanelonline.com/register?inviter_id=2066378
guys mas mabilis ang kita dito online paid survey yan..galante talaga kaya marami ang sumali
instruction:
reg kayo dito http://ph.ipanelonline.com/register?inviter_id=2066378
pag maka reg na punta sa email add para ma verify ang account niyo
pag na verify na puwde na mag log in
pag naka log in ka na
punta agad sa QUICK SURVEY tab kasi dito lahat nakikita ang survey
every log in niyo may points plus kung mag comment kayo sa opinion every day may points din
gusto makita ang points niyo punta sa MY POINTS
para sa mag redeem punta sa REDEEM promise proven and tested sure income and legit talaga.:thumbsup:
 

Attachments

  • 999733_519066298149368_1060279273_n.jpg
    999733_519066298149368_1060279273_n.jpg
    76.8 KB · Views: 9
Re: Sql dates !

thanks sir. :))





ASK LANG AKO K'SYMB. Gusto ko sana yung input ko "JANUARY"(name of the months) instead of 1(integer) .. pero paano po yun ?



EXAMPLE CODE KO:

exec sp_veh_approved 1,2012

-gusto ko sana palitan yung 1 at ilagay ko JANUARY,, pero paano po yun?
kapag pinapalitan ko naman ng January hindi siya nagana,, kasi yung output ng date_survey ko is 1/1/2012 hindi january/1/2012 kaya d sya nagana pero baka may ibang way kayo dyan mga sir, para mafilter ko ito.. ? or just edit my code kung may nakita kayong pwedeng gawing solusyon.. thanks..

VALUE kasi ng sa SYSTEM ko JANUARY TO DECEMBER eh text siya hindi INT. kaya ganun... thanks .. :D

see pic..
View attachment 769469


eto code ko









CREATE PROCEDURE dbo.sp_veh_approved(@month int, @year
int) AS

SELECT DISTINCT COUNT(date_survey) AS DS
FROM survinfo_1dir a,survraw_1dir b
WHERE datepart(mm,date_survey) = @month AND datepart(mm,date_survey) = @year AND a.header_no=b.header_no

UNION ALL

SELECT DISTINCT COUNT(date_survey) AS DS
FROM survinfo_2dir c,survraw_2dir d
WHERE datepart(mm,date_survey) = @month AND datepart(yy,date_survey) = @year AND c.header_no=d.header_no


gamitin mo FORMAT properties
sample : Format(Today, "MMMM dd, yyyy")
output nito : August 01, 2013


d = # day
dd = ## day
yyyy= #### year
M = # number month
MM = ## number month
MMM = 3 character month
MMMM = Full month
 
mga sir patulong naman po.... noob lang po sa vb....

need ko po ng code regarding dito.. (2 textbox po gamit) If/ElseIf daw po gamit...

Temperature Label
Temp<0 ICE
Temp bet. 0 and 100 WATER
Temp >100 Stream


eto po code ngawa ko walang error pero lumalabas po ito...

Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If TextBox1.Text <= 0 Then
TextBox2.Text = "ICE"
ElseIf TextBox1.Text <= 100 Then
TextBox2.Text = "WATER"
Else
TextBox2.Text = "STREAM"

End If
End Sub
End Class


InvalidCastException was unhandled
Conversion from string "" to type 'Double' is not valid.
Make sure the source type is convertible to the destination type...


pahelp naman po.....
:help:

convert mo sa integer ung string value nung textbox


If Val(TextBox1.Text) <= 0 Then
TextBox2.Text = "ICE"
ElseIf Val(TextBox1.Text) <= 100 Then
TextBox2.Text = "WATER"
Else
TextBox2.Text = "STREAM"
End If
 
Good PM guys

Ask ko sana Panu mag Loop sa Isang Datareader?

Meron kase akong Query na may 52 Fields at ListView na may 52 Columns

gusto ko sana mag loop nalang sa DataReader para hindi na Manu-manu ang pag add ng item sa ListView "More Lines of Code"

Note:
Kaya ListView yan kase Update lang ako sa Code, Madali sana kung naka DataGrid :lol:

loop nio gamit for loop..

0 to (field.counts - 1 )
 
Back
Top Bottom