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!

Exclusively for Visual Basic 6.0 Programmers Only!

#include<iostream>
#include<string>
using namespace std;

int main()
{
string x,y;
do
{
system ("cls")
cout<<"SYSTEM MENU\n"
<<"a. Activity 1\n"
<<"b. Activity 2\n"
<<"c. Activity 3\n"
<<"d. Activity 4\n"
<<"e. Activity 5\n"
<<"f. Activity 6\n"
<<"g. Activity 7\n";

cout<<"Enter your choice: ";
cin>>x;

if (x=="a")
{
system ("cls")
cout<<"My First C++ program.\n";
cout<<"\n\nDo you want to quit? (y/n)";
cin>>y;
}
else if (x=="b")
{
system ("cls")
cout<<"Name\t\t\t\t\t\t\t\t\t\t"<<"Name";
cout<<"\t\t\t\t\t"<<"Name\t\t\t\t\t";
cout<<"Name\t\t\t\t\t\t\t\t\t\t"<<"Name";

cout<<"\n\nDo you want to quit? (y/n)";
cin>>y;
}
else if (x=="c")
{
system ("cls")
int a,b,z;
cout<<"Enter first number: ";
cin>>a;
cout<<"Enter second number: ";
cin>>b;

z=a+b;
<<"The sum of the two numbers is "
<<sum
cout<<sum<<"\n\n\n";

cout<<"\n\nDo you want to quit? (y/n)";
cin>>y;
}
else if (x=="d")
{
system ("cls")
char a[99],b[99],c[99],d[99],e[99],f[99];
cout<<"Name: ";
cin.getline (a,99);
cout<<"Address: ";
cin.getline (b,99);
cout<<"Age: ";
cin.getline (c,99);
cout<<"Gender: ";
cin.getline (d,99)
cout<<"Course: ";
cin.getline (e,99);
cout<<"Section: ";
cin.getline (f,99);

cout<<"Hello "<<a<<" ! You are "<<c<<" years of age and you leave at "<<b<<". Goodluck to your "<<e<<" course.

cout<<"\n\nDo you want to quit? (y/n)";
cin>>y;
}
}
while (y=="n");
return 0;
}



Pa help ang hirap . Di ko alam saan dyan un error eh .Pa help !!
 
naglagay lang po ako ng tatlong comboboxes. Ang isa para sa Month, isa para sa Day, isa sa Year. Tapus para mapasok sa Birthdate na field ko sa tbl_patron ko sa MAccess. Ganito lng po ginawa ko.

pano den po yung paginput ng year kasi mahaba po yun eh manual po ba ginawa niyo dun sa list?. i mean mano mano niyo po ba nitype yung year dun sa list?
 
Sa iba baka may code po kayo ng SMS na may sent,pti receive tpos mkkta ko sya sa listview.....


yung parang interface po ng dashboard ng broadbands......
 
Last edited:
pano paganahin yan? anong software pa gagamitin ko? help I want to try :)
 
Sa iba baka may code po kayo ng SMS na may sent,pti receive tpos mkkta ko sya sa listview.....


yung parang interface po ng dashboard ng broadbands......

Alam mo pwede mong gawin jan insert mo sa database yung mga sinent (alam mo naman cguro yan) mo, ang magging problem mo lang talaga dito is yung receive message. kasi mag iti triger or ilolocate ka dun para makuha lang ung message and para makuha mo yung number nung sender, pwede mong gamitin yung inattach kong file as your reference although magulo yan.

sana makatulong sayo.
 

Attachments

  • SendReciv FINAL.zip
    5.6 KB · Views: 12
naglagay lang po ako ng tatlong comboboxes. Ang isa para sa Month, isa para sa Day, isa sa Year. Tapus para mapasok sa Birthdate na field ko sa tbl_patron ko sa MAccess. Ganito lng po ginawa ko.

AdodcReg.Recordset.Fields("BIRTHDATE") = CDate(cboMonth.Text & "/" & cboDay.Text & "/" & cboYear.Text)

sir jernel paturo naman po kung pano gawin ung birth date yung tulad po kay kuya jyxae ung combo box na 3 yung sa year lang po pano po ba yun mano mano po ba dapat ung paglagay sa year dun sa list tulad ng 1987 hanggang 2012? kasi yung date at month mano mano po yung ginawa ko eh..pano po sa year kasi mahaba po yun eh :help: at ano po yung CDate? dun sa adodcreg.
 
sir jernel paturo naman po kung pano gawin ung birth date yung tulad po kay kuya jyxae ung combo box na 3 yung sa year lang po pano po ba yun mano mano po ba dapat ung paglagay sa year dun sa list tulad ng 1987 hanggang 2012? kasi yung date at month mano mano po yung ginawa ko eh..pano po sa year kasi mahaba po yun eh :help: at ano po yung CDate? dun sa adodcreg.

pwede ka gumamit ng for loop.

Code:
For a = 1987 To 2012
    Combo1.AddItem a
Next

or pwede ka gumamit ng date picker. :)
 
pwede ka gumamit ng for loop.

Code:
For a = 1987 To 2012
    Combo1.AddItem a
Next

or pwede ka gumamit ng date picker. :)

salamat po sir hehe :thanks: pano naman po if ung database ko sa MSAccess sa birth date ung data type nya ay Date/Time anu po naman dapat ung code na kailagan kong ilagay? or dapat bang text nalang?

AdodcReg.Recordset.Fields("BIRTHDATE") = CDate--->para saan po ba ito? di ko kasi po gets ito eh(cboMonth.Text & "/" & cboDay.Text & "/" & cboYear.Text)

EDIT: ok na po pala salamat
 
Last edited:
sir pahelp naman po ulit bakit po ganito ung lumalabas na prompt error sakin pag niclick ko na po ung add button.. Empty row cannot be inserted. Row must have at least one column value set. ito po yung code ko..

Private Sub cmdadd_Click()

Adodc1.Recordset.AddNew
Adodc1.RecordSource = "select * from tblmember"

If txtlastname = "" And txtfirstname = "" And txtmiddlename = "" And cbomonth = "" And cboday = "" And cboyear = "" And cbogender = "" And txtcontactnumber = "" And txtaddress = "" And txtemail = "" Then
MsgBox "YOU NEED TO FILL UP THE NEEDED FIELDS", vbOKOnly + vbInformation, "Registration"
Else
If MsgBox("Are you Sure?", vbYesNo + vbQuestion, "Your Data Added") = vbYes Then
Adodc1.Recordset.Fields("Last Name") = txtlastname.Text
Adodc1.Recordset.Fields("First Name") = txtfirstname.Text
Adodc1.Recordset.Fields("Middle Name") = txtmiddlename.Text
Adodc1.Recordset.Fields("Birth Date") = CDate(cbomonth.Text & "/" & cboday.Text & "/" & cboyear.Text)
Adodc1.Recordset.Fields("Gender") = cbogender.Text
Adodc1.Recordset.Fields("Contact Number") = txtcontactnumber.Text
Adodc1.Recordset.Fields("Address") = txtaddress.Text
Adodc1.Recordset.Fields("E-mail") = txtemail.Text
Adodc1.Recordset.Update

Adodc1.Refresh

txtlastname.Text = ""
txtfirstname.Text = ""
txtmiddlename.Text = ""
cbomonth.Text = ""
cboday.Text = ""
cboyear.Text = ""
cbogender.Text = ""
txtcontactnumber.Text = ""
txtaddress.Text = ""
txtemail.Text = ""
txtlastname.SetFocus
End If
End If
End Sub
 
Last edited:
sir help naman po ulit dami kong tanong hehe sana po hindi kayo magsawang sumagot salamat po..about po dito sa SS ko kasi pag hindi ako nagtype ng date den click ko na yun Add button yan yung lumalabas na error po pano po ba iresolve yan. :thanks: in advance

codekw.jpg
 
sir pahelp naman po ulit bakit po ganito ung lumalabas na prompt error sakin pag niclick ko na po ung add button.. Empty row cannot be inserted. Row must have at least one column value set. ito po yung code ko..

try this one :)

Code:
Private Sub cmdadd_Click()

Adodc1.RecordSource = "select * from tblmember"
Adodc1.Refresh

If txtlastname = "" And txtfirstname = "" And txtmiddlename = "" And cbomonth = "" And cboday = "" And cboyear = "" And cbogender = "" And txtcontactnumber = "" And txtaddress = "" And txtemail = "" Then
	MsgBox "YOU NEED TO FILL UP THE NEEDED FIELDS", vbOKOnly + vbInformation, "Registration"
Else
	If MsgBox("Are you Sure?", vbYesNo + vbQuestion, "Your Data Added") = vbYes Then
		Adodc1.Recordset.AddNew
		Adodc1.Recordset.Fields("Last Name") = txtlastname.Text
		Adodc1.Recordset.Fields("First Name") = txtfirstname.Text
		Adodc1.Recordset.Fields("Middle Name") = txtmiddlename.Text
		Adodc1.Recordset.Fields("Birth Date") = CDate(cbomonth.Text & "/" & cboday.Text & "/" & cboyear.Text)
		Adodc1.Recordset.Fields("Gender") = cbogender.Text
		Adodc1.Recordset.Fields("Contact Number") = txtcontactnumber.Text
		Adodc1.Recordset.Fields("Address") = txtaddress.Text
		Adodc1.Recordset.Fields("E-mail") = txtemail.Text
		Adodc1.Recordset.Movenext

		txtlastname.Text = ""
		txtfirstname.Text = ""
		txtmiddlename.Text = ""
		cbomonth.Text = ""
		cboday.Text = ""
		cboyear.Text = ""
		cbogender.Text = ""
		txtcontactnumber.Text = ""
		txtaddress.Text = ""
		txtemail.Text = ""
		txtlastname.SetFocus
	End If
End If
End Sub
 
sir patulong nmn po ako vb.net po ito, ang problema po eh ung listview, ok lang po siya kung isang product lang ang iniinput kaso pagnag iba ung nilalagay na product ung mga nainput mo na product eh ngiging kagaya ng huli mong ininput, see attachment below thanks po sa mga tutulong,...
 

Attachments

  • Program.rar
    71.5 KB · Views: 6
mga sir pa help naman may error po ako na encounter dito sa codes. im using sql INNER JOIN TO DISPLAY RECORD IN LISTVIEW.

Private Sub Form_Load()
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name into jo_backup from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"
Call PopulateListView(Me, sSQL)
End Sub

Sub PopulateListView(frm As Form, sSQL As String)

Dim sConn As New ADODB.Connection
Dim rsADO As New ADODB.Recordset
Dim xList As ListItem
Dim iCol As Long

sConn.Open gstrConnectionString

frm.lvwViewer.ListItems.Clear

If sConn.State = adStateOpen Then

rsADO.Open sSQL, sConn, adOpenForwardOnly
*** rsADO.MoveFirst - DITO PO ANG ERROR NYA
frm.lvwViewer.ColumnHeaders.Clear

'For iCol = 0 To rsADO.Fields.Count - 1

'frm.lvwViewer.ColumnHeaders.Add , , "", 0
frm.lvwViewer.ColumnHeaders.Add , , rsADO.Fields(1).Name, 3000

'Next

Do While Not rsADO.EOF

Set xList = frm.lvwViewer.ListItems.Add(, , rsADO.Fields(1))
'xList.SubItems(1) = rsADO.Fields(1)
xList.Tag = rsADO.Fields(0)

rsADO.MoveNext
' DoEvents
Loop
Else
'Err.Raise vbObjectError + 513, ERR_CAN_NOT_OPEN_CONNECTION
End If

Set rsADO = Nothing
sConn.Close
Set sConn = Nothing
End Sub


*** RUN-TIME ERROR "3704" OPERATION IS NOT ALLOWED WHEN THE OBJECT IS CLOSED.
 
mga sir pa help naman may error po ako na encounter dito sa codes. im using sql INNER JOIN TO DISPLAY RECORD IN LISTVIEW.

Private Sub Form_Load()
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name into jo_backup from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"
Call PopulateListView(Me, sSQL)
End Sub

Sub PopulateListView(frm As Form, sSQL As String)

Dim sConn As New ADODB.Connection
Dim rsADO As New ADODB.Recordset
Dim xList As ListItem
Dim iCol As Long

sConn.Open gstrConnectionString

frm.lvwViewer.ListItems.Clear

If sConn.State = adStateOpen Then

rsADO.Open sSQL, sConn, adOpenForwardOnly
*** rsADO.MoveFirst - DITO PO ANG ERROR NYA
frm.lvwViewer.ColumnHeaders.Clear

'For iCol = 0 To rsADO.Fields.Count - 1

'frm.lvwViewer.ColumnHeaders.Add , , "", 0
frm.lvwViewer.ColumnHeaders.Add , , rsADO.Fields(1).Name, 3000

'Next

Do While Not rsADO.EOF

Set xList = frm.lvwViewer.ListItems.Add(, , rsADO.Fields(1))
'xList.SubItems(1) = rsADO.Fields(1)
xList.Tag = rsADO.Fields(0)

rsADO.MoveNext
' DoEvents
Loop
Else
'Err.Raise vbObjectError + 513, ERR_CAN_NOT_OPEN_CONNECTION
End If

Set rsADO = Nothing
sConn.Close
Set sConn = Nothing
End Sub


*** RUN-TIME ERROR "3704" OPERATION IS NOT ALLOWED WHEN THE OBJECT IS CLOSED.


baka makatulong

baka naka close din ang connection
http://www.youtube.com/watch?v=3MBWHL5UNMg
 
Last edited:
mga sir pa help naman may error po ako na encounter dito sa codes. im using sql INNER JOIN TO DISPLAY RECORD IN LISTVIEW.

Private Sub Form_Load()
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name into jo_backup from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"
Call PopulateListView(Me, sSQL)
End Sub

Sub PopulateListView(frm As Form, sSQL As String)

Dim sConn As New ADODB.Connection
Dim rsADO As New ADODB.Recordset
Dim xList As ListItem
Dim iCol As Long

sConn.Open gstrConnectionString

frm.lvwViewer.ListItems.Clear

If sConn.State = adStateOpen Then

rsADO.Open sSQL, sConn, adOpenForwardOnly
*** rsADO.MoveFirst - DITO PO ANG ERROR NYA
frm.lvwViewer.ColumnHeaders.Clear

'For iCol = 0 To rsADO.Fields.Count - 1

'frm.lvwViewer.ColumnHeaders.Add , , "", 0
frm.lvwViewer.ColumnHeaders.Add , , rsADO.Fields(1).Name, 3000

'Next

Do While Not rsADO.EOF

Set xList = frm.lvwViewer.ListItems.Add(, , rsADO.Fields(1))
'xList.SubItems(1) = rsADO.Fields(1)
xList.Tag = rsADO.Fields(0)

rsADO.MoveNext
' DoEvents
Loop
Else
'Err.Raise vbObjectError + 513, ERR_CAN_NOT_OPEN_CONNECTION
End If

Set rsADO = Nothing
sConn.Close
Set sConn = Nothing
End Sub


*** RUN-TIME ERROR "3704" OPERATION IS NOT ALLOWED WHEN THE OBJECT IS CLOSED.

Hi Sir,
Pasensya na at di kita masagot masyado, busy kasi sa work...
May tinatapos pa na project.

Heto pala ang napansin ko.
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name into jo_backup from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"

the red font in the SQL Statement above. Nilagay mo ba talaga ito?
Every time you open this statement it creates a table named jo_backup.

Remove the "into jo_backup" in your statement and that should work.
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"

Dun po sa ibang questions, if you want to navigate through your records.
1. Declare a Private recordset on your form module.
2. On your form load open the recordset and keep it connected.
3. On your navigation buttons, you can call the recordset's method
like movefirst, movenext, moveprevious and movelast.
4. On form_unload, that will be the time that you should close the connection and recordset
 
Last edited:
Hi Sir,
Pasensya na at di kita masagot masyado, busy kasi sa work...
May tinatapos pa na project.

Heto pala ang napansin ko.
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name into jo_backup from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"

the red font in the SQL Statement above. Nilagay mo ba talaga ito?
Every time you open this statement it creates a table named jo_backup.

Remove the "into jo_backup" in your statement and that should work.
sSQL = "SELECT tblJO.proj_date,tblcustomers.customer_name from tbljo INNER JOIN tblcustomers on tblJO.Customer_ID=tblCustomers.Customer_ID"

Dun po sa ibang questions, if you want to navigate through your records.
1. Declare a Private recordset on your form module.
2. On your form load open the recordset and keep it connected.
3. On your navigation buttons, you can call the recordset's method
like movefirst, movenext, moveprevious and movelast.
4. On form_unload, that will be the time that you should close the connection and recordset

nilagay ko ung jo_backup ibinase ko po sa sample w3schools.com

nagdisplay na sya ng record sa listview. pero customer lang ang andun sa listview wala ang proj_date
 
Back
Top Bottom