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!

mga bro help naman .... maliit n tulong lang..nalimutan ko kasi ...

may textbox ako ..which is list ng mga information ng judge.. name,gender,address and so on... then may button na add muna..saka n ung iba...then ang prob is .. d ko na alam kung papanu ko ma a-add ung info sa textbox through listview.. help pls... tnx

Text at SubItems(n) ng Listview gives you the columns for that. pde mo na i display sa textbox

Textbox1.text =Listview1.SelectedItem.text
TextBox2.Text =Listview1.SelectedItem.SubItems(1)


pero di dapat ganyan, get the data from the database mismo, that way fresh ang data in case may ibang nag update nun.

Mukhang nakalimutan mo na ang itinuro ko ah.......
 
Mga Tol Paki help po kung paanu maglalagay ng Code sa Search button na e sesearch niya po ung Name na Existing na sa Access (ADODC)
 
Mga Tol Paki help po kung paanu maglalagay ng Code sa Search button na e sesearch niya po ung Name na Existing na sa Access (ADODC)

Run a Query like this against the recordset of your ADODC.
SELECT * FROM (table) WHERE field = (Search Criteria)

ex:
SELECT * FROM Users WHERE UserID = "1001"

personally i would not recommend ADODC for serious projects, it was intended for newbies learning database access concepts, use ADODB instead so you can run queries like SELECT, INSERT, UPDATE and DELETE, it will make you a good programmer and ready to adapt to any RDBMS when you have your real job.

Ewan ko ba hangang ngayon itinuturo parin and ADODC sa schools......
 
SELECT * From po ba?

Bali po lalagay pa po ako sa Textbox ng Gusto ko E search...Meron po kayu YM?...Pede po pa add para paturo ako online tutorial.. maui_party
 
SELECT * From po ba?

Bali po lalagay pa po ako sa Textbox ng Gusto ko E search...Meron po kayu YM?...Pede po pa add para paturo ako online tutorial.. maui_party

Find my YM ID and Add me.
 
Di ko msyadong magets tol, paki linaw or screenshot po tol

Private Sub cmdSubmit_Click()
If txtfname = "" Or txtlname = "" Or txtuname = "" Or txtpword = "" Or txtmint = "" Then
MsgBox "The required information are left empty.", vbExclamation, "Error"
Else


adouser.RecordSource = "select * from user"
adouser.Refresh
adouser.Recordset.AddNew
adouser.Recordset!uname = txtuname.Text
adouser.Recordset!pword = txtpword.Text
adouser.Recordset!fname = txtfname.Text
adouser.Recordset!mint = txtmint.Text
adouser.Recordset!lname = txtlname.Text


adouser.Recordset.Update
MsgBox "User successfully added as an ADMINISTRATOR", vbInformation, "Add"
adouser.Recordset.MoveLast
Call cmdReset_Click
End If
End Sub



---------------------------------------
kuya ano bang mali dito???
nalabas po IADODC refresh, error in FROM clause...
salamat po. uuu
 
Private Sub cmdSubmit_Click()
If txtfname = "" Or txtlname = "" Or txtuname = "" Or txtpword = "" Or txtmint = "" Then
MsgBox "The required information are left empty.", vbExclamation, "Error"
Else


adouser.RecordSource = "select * from user"
adouser.Refresh
adouser.Recordset.AddNew
adouser.Recordset!uname = txtuname.Text
adouser.Recordset!pword = txtpword.Text
adouser.Recordset!fname = txtfname.Text
adouser.Recordset!mint = txtmint.Text
adouser.Recordset!lname = txtlname.Text


adouser.Recordset.Update
MsgBox "User successfully added as an ADMINISTRATOR", vbInformation, "Add"
adouser.Recordset.MoveLast
Call cmdReset_Click
End If
End Sub



---------------------------------------
kuya ano bang mali dito???
nalabas po IADODC refresh, error in FROM clause...
salamat po. uuu


Guys if you notice di ako masyadong nagrereply pag ang issue ay about ADODC, im trying to encourage everyone lalo newbies to switch agad sa ADODB style of database programming. You will soon see my point once na nasa trabaho na kayo.

Case in point;
Adding a record:
adouser.RecordSource = "select * from user"
bakit ko kelangan kunin ang buong laman ng table (SELECT * FROM USER) kung mag add lang naman ako ng isang record? why is that? imagine ang overhead ng system nyo, bubunutin nya buong laman ng table then ano gagawin sa data? wala, kasi mag add lang ako ng record sa dulo. if you are on a large database sa network, this will bring your system down.

Kung ADODB yan ill just use an SQL Action Query to send the data directly sa database
Like this

Code:
strQuery  = "INSERT INTO user (uname,pword ,fname,mint, lname)
VALUES(" & txtuname.Text & "," & txtpword.Text  & "," & txtfname.Text  & "," & txtmint.Text & "," & txtlname.Text)

***note, enclosed sa single qoutes kung string yung datatype ng fields

then execute ko lang yan using command object like this

Code:
 Dim cmd As ADODB.Command
    Set cmd = New ADODB.Command 'gumamit ng ADODB.Command sa mga query na walang ibinabalik na data like INSERT, UPDATE, DELETE
    cmd.ActiveConnection = cn ' connection object pointing to the database
    cmd.CommandText = strQuery 'ito yung SQL statement ng Command
    cmd.CommandType = adCmdText 'text or Stored procedureang type
    
    Dim n As Integer
    [B]cmd.Execute n[/B] 'ayan EXECUTE/RUN the command
    If n = 1 Then 'pag n ay 1 ibig sabihin may isang record na na insert, pag ZERO means di nag insert, may error
        bReturn = True
        MsgBox "Record was Inserted", vbInformation
    Else
        bReturn = False
        MsgBox "Record was not inserted", vbInformation
    End If


If you examine the code, ala ako binabasang any record sa database bago mag insert, so one way lang ang data, papunta lang sa database.

if you are going to use other RDBMS in the future like oracle, sybase, mysql, stc, pretty much the same ang code, using SQL commands. Then sa VB.NEt ganyan din ang way to use ADO.NET and more.
My thread about vb6/access shows all of this

Ive known a few who are now good at using it at sabi nila mas madali gamitin at madali idebug, im sure ready na sila sumabak sa ibang field pagka graduate.

PEro anyway, its still the programmer's choice in the end. Question is, is it the right choice?


http://www.google.com.ph/search?rlz=1C1GGLS_enPH359PH359&sourceid=chrome&ie=UTF-8&q=ADODB+vs+ADODC
 
Last edited:
If you will also notice,
di ako magrereply sa mga NANGHIHINGI,
but i will try to reply sa mga NAGPAPATURO.
I try to help by sharing my KNOWLEDGE,
not GIVING SYSTEMS.

My goal kaya ako nandito sa forum na to is to teach young programmers
and let them see and prepare them kung ano ang actual na maeencounter
nila sa mga real programming jobs after graduation.
 
Last edited:
maganda sana boss yung may separate thread ka for small tutorial:

like 1. tutorial on how to open/close database
2. tutorial on how to open/close recordset
3. tutorial on how to use the recordset
4. How to make simple function: public, private, sub
5. and other basic tutorials


sometimes, those simple basics are not fully taught and understood by students.
ako nga, hindi ko pa talaga fully grasp, sometimes, I go back and rely to samples.

Mas ok boss yung ma-explain mo ng mas simplified. Well, suggestion lang nman yun boss, alam ko nman busy ka.
 
isang magandang tutorial boss is yung encrypt/decrypt function with matching explanation ng terms and variables.
 
maganda sana boss yung may separate thread ka for small tutorial:

like 1. tutorial on how to open/close database
2. tutorial on how to open/close recordset
3. tutorial on how to use the recordset
4. How to make simple function: public, private, sub
5. and other basic tutorials


sometimes, those simple basics are not fully taught and understood by students.
ako nga, hindi ko pa talaga fully grasp, sometimes, I go back and rely to samples.

Mas ok boss yung ma-explain mo ng mas simplified. Well, suggestion lang nman yun boss, alam ko nman busy ka.

isang magandang tutorial boss is yung encrypt/decrypt function with matching explanation ng terms and variables.

Brod kulang pa ba tong sample ko dito?
[TUT] VB6 MSAccess Sample using ADO (UPDATED V2 20091212) now with LogIn Form

Lahat ng sinabi mo nandito pati encryption ng password, very simple to follow for anybody who puts their mind to it.

Part din ng challenge is yung ability na intindihin ang code, may google naman kung di alam ang terms or keywords, besides, its not all about the code, kundi yung paraan ng pag gawa, the flow, the sequence.

Kumpleto comments na yan line by line. Pde na rin bunutin yung isang function para gamitin sa ibang projects.

Plano ko ituloy yan into a complete system complete with transactions and reporting, pero walang nagsasuggest manlang.
 
mukhang hindi ko pa napupuntahan yun. pero kung andun po yung mga basics maganda po yun.

Mas mabuti nga po kung gawin nyo pong complete with transaction and reporting. Pati na rin po papaano gumawa ng menu bar at sub-menus.

pwede nyo rin ba ilagay sa complete system yung datagrid kasi mejo mahina ako dun. yung parang subform in a datasheet view.

Para po ma-appreciate namin ng mas mabuti ang flow ang different objects. thanks.

Kung nde nman po kalabisan, aside from access backend, pwede rin po ba mysql gamitin natin para mas powerful using dnsless connection. thanks boss.
 
mukhang hindi ko pa napupuntahan yun. pero kung andun po yung mga basics maganda po yun.

Mas mabuti nga po kung gawin nyo pong complete with transaction and reporting. Pati na rin po papaano gumawa ng menu bar at sub-menus.

pwede nyo rin ba ilagay sa complete system yung datagrid kasi mejo mahina ako dun. yung parang subform in a datasheet view.

Para po ma-appreciate namin ng mas mabuti ang flow ang different objects. thanks.

Kung nde nman po kalabisan, aside from access backend, pwede rin po ba mysql gamitin natin para mas powerful using dnsless connection. thanks boss.

Ty mo muna puntahan at i download yung sample version2

I dont use yung datagrid sa mga gawa ko, mas ok yung Flexgrid kasi pde ka mag edit sa cells at hndi sya databound gaya ng datagrid, sige include ko sa samples ko this coming weekend.

Sa menu bars, simple lan yun so no need to show, you can find it sa editor ng VB6, CTR+E ka lang, nandun na ang menu editor. no mystery,parang buttons lang yan.

I go for simple but solid system, bahala na kayo sa borloloy ng GUI

I dont use mySQL sa vb6, i use that sa PHP; saka wala ako mySQL server sa laptop ko so di ako makagawa ng sample, pero basically connection string lang ang papalitan mo, rest of the code same lang. Kaya nga im encouraging you guys to use ADODB, pde mo na ikabit sa mySQL na walang modifications aside from connection string lang.

I dont agree na mas powerful ang mySQL, try to browse yung mga comparison ng mga databases muna. EAch has their own high points at depende sa purpose mo.
Madami na ako nagamit na RDBMS pero wala ako reklamo sa lahat, importat is alam mo kung papano gamitin. Because sa actual job, money will dictate kung ano ang gagamitin, not the programmer.


By the way papano ko kumpletohin yung system? ano ang roadmap neto? I mean anong klaseng system ba ang patutunguhan neto?

If i were to decide, gagawa ako ng system na di magagamit sa thesis. Only to serve as basis lang.
 
no prob yun bro. mabuti nga yung di magagamit sa thesis. just basis for learning lamang. ikaw na po bahala mag decide kung anu.

oo tama, flexgrid pala. wrong term. hehehe.

what I mean about mysql as powerful bro, its the data storage capacity. cge pwede na rin ang access muna. lagyan mo pa pala password ang access db bro para ma-include sa code ang db password.
 
Back
Top Bottom