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!

Magandang araw spo sa inyu. Patulong naman po. Ito ang scenario:

May combobox aku para sa list of subjects...each subject na naka paloob dito may kanya-kanyang subj_id dun sa tbl_subject sa database ko. Ang gusto ko pung mangyari, eh pag nakapili si user ng subject, hindi yung "name" nung subject ang mase-save dun sa isang table ko pa sa database..kundi yung subj_id na katumbas dun sa subject na napili.

Paano po ba gawin yun? HUHU. patulong naman po.:pray::pray::pray:
 
Magandang araw spo sa inyu. Patulong naman po. Ito ang scenario:

May combobox aku para sa list of subjects...each subject na naka paloob dito may kanya-kanyang subj_id dun sa tbl_subject sa database ko. Ang gusto ko pung mangyari, eh pag nakapili si user ng subject, hindi yung "name" nung subject ang mase-save dun sa isang table ko pa sa database..kundi yung subj_id na katumbas dun sa subject na napili.

Paano po ba gawin yun? HUHU. patulong naman po.:pray::pray::pray:

ComboBox1.DisplayMember = "SubjectName"
ComboBox1.ValueMember = "SubjectID"
ComboBox1.DataSource = datatablegalingsadatabase


xID = ComboBox1.SelectedValue
 
ComboBox1.DisplayMember = "SubjectName"
ComboBox1.ValueMember = "SubjectID"
ComboBox1.DataSource = datatablegalingsadatabase


xID = ComboBox1.SelectedValue



Galing naman :)) sana ganyan din ako. hehe. salamat sir. :clap: :yipee:
 
Sir its me pablo12 panu po makonek ung msaccess sa vb6 using adodc at datagrid?
What should i do first.?
Big thanks for this thread Ts.
Hope n masagot agad hehe :D
 
Sir its me pablo12 panu po makonek ung msaccess sa vb6 using adodc at datagrid?
What should i do first.?
Big thanks for this thread Ts.
Hope n masagot agad hehe :D

try mo to
http://www.symbianize.com/showthread.php?t=163979

walang datagrid dyan pero pinakita ko dyan pano mag connect sa access using connection string

di ko fan ng datagrid sa vb6, unlike sa VB.NET so listview ang ginagamit ko dun.

yun nalang ang assignent mo, to use datagrid.
 
Sir its me pablo12 panu po makonek ung msaccess sa vb6 using adodc at datagrid?
What should i do first.?
Big thanks for this thread Ts.
Hope n masagot agad hehe :D

note lang VB.NET po dito ha, dun sa kabila ang vb6

para naman malinis po ang forum natin at di halo halo
 
sir ask ko lang yung sa format kasi yung

student i.d ko sa DB naka smallint(7) zerofill bale ganito po format nya sa DB = 0000001

pag dating sa listview po " 1 " po yung display ni listview ..

pa help po :praise:


@ sir erick , thanks naliwanagan na ako dun sa system :)
 
sir ask ko lang yung sa format kasi yung

student i.d ko sa DB naka smallint(7) zerofill bale ganito po format nya sa DB = 0000001

pag dating sa listview po " 1 " po yung display ni listview ..

pa help po :praise:


@ sir erick , thanks naliwanagan na ako dun sa system :)

of course, maski zero fill yan sa database, integer parin yan
so option mo ay i pad ng zeros on the fly (s sql palang)
or i pad sa display, like sa textbox or grid formatting

medyo ayaw klo ang ganyan na approach

pero kung ako, sa database char(10) na yan
at pag save ko palang ay nakapad na yung field,
so wala ako problem sa pag display

gasino ba naman i pad once na nag insert ka diba?


saka student ID yan, di ba meron format sa mga ID?

ginagamit ko lang yan as hidden index ng field, hiwlay pa yung autogenerated or user input na student id mismo

gaya neto

attachment.php
 

Attachments

  • Capture0301.PNG
    Capture0301.PNG
    42.3 KB · Views: 39
sir ask ko lang yung sa format kasi yung

student i.d ko sa DB naka smallint(7) zerofill bale ganito po format nya sa DB = 0000001

pag dating sa listview po " 1 " po yung display ni listview ..

pa help po :praise:


@ sir erick , thanks naliwanagan na ako dun sa system :)

cast mo as char

Code:
select cast(studentId as char) as `studentId` from ....
 
cast mo as char

Code:
select cast(studentId as char) as `studentId` from ....

i dont think cast will work kasi yung
smallint(7) zerofill ay format sa access,
thats how it will look like sa access table (di ko ginagamit yan, i just store data)
to the outside app, integer parin na

datatype = int
stored as = 1
formatted as zero fill = 0000001
read as = 1

try nyo nalang, baka mali ako,
i never really tried using yung mga formatting ng access
kasi di naman magagamit OUTSIDE of access
 
i dont think cast will work kasi yung
smallint(7) zerofill ay format sa access,
thats how it will look like sa access table (di ko ginagamit yan, i just store data)
to the outside app, integer parin na

datatype = int
stored as = 1
formatted as zero fill = 0000001
read as = 1

try nyo nalang, baka mali ako,
i never really tried using yung mga formatting ng access
kasi di naman magagamit OUTSIDE of access

aw. access pala database kala ko mysql, it works in mysql. if the syntax is the same, probably that would work. pa try nalang. i dont use access kasi hehehe.

**EDiT **
SELECT FORMAT([ID],"0000000") AS `myId` FROM Table1;
if access, para ma fill nya ng zero

or if you want to make sure add CSTR before ng format
 
Last edited:
2nd yr it na ako and still newbie parin magvb.. pabookmark ts thank you for sharing!
 
mga sir panu po magcopy ng laman ng mga field to another table (ms access 2007), pagkaclick po ng button tapos maglalagay sya ng date fields kung anu ung araw n iniclick?(visual studio 2012)
 
mga sir panu po magcopy ng laman ng mga field to another table (ms access 2007), pagkaclick po ng button tapos maglalagay sya ng date fields kung anu ung araw n iniclick?(visual studio 2012)

marunong ka siguro magbasa ng record?
marunong ka rin mag INSERT ng record?
tama?

pagsamahin mo lang ang skills na yan

READ RECORD FROM TABLE1 >>>> WRITE RECORD TO TABLE2

application ng skills
 
mga sir panu po magcopy ng laman ng mga field to another table (ms access 2007), pagkaclick po ng button tapos maglalagay sya ng date fields kung anu ung araw n iniclick?(visual studio 2012)

1 of the simple way gawa ka ng landing form ng data na kokopyahin mo then set ka ng new table sa database mo dun mo iinsert.. Magprovide akanarin ng column for date then lagay mo tong code nato sa isa sa mga value na iinsert mo.

Code:
dim mydate as date

mydate = now.date()
 
mga sir panu po magcopy ng laman ng mga field to another table (ms access 2007), pagkaclick po ng button tapos maglalagay sya ng date fields kung anu ung araw n iniclick?(visual studio 2012)

insert into table1([column1],[etc...]) (select [column1],[etc..] from table2);

** EdiT **
sa pag insert, lagay mo CURRENT_TIMESTAMP()
 
Last edited:
Back
Top Bottom