Displaying specific fields in the datagrid from a MySQL search result in VB.NET -


i design (php) db editors in gaming world past time. took challenge of doing same thing, time vb (originally 6, mysql tricky) i'm working 2008.

one of tables has massive amount of info , need display 4 or 5 fields search result (there on 100+ fields)

i know how populate grid whole table, not know how via specific fields without going long way around it.

this first time vb6 vb.net - sadly not impressed (looks (m$) have deviated "basic" , went c++ engine format - super ugly (but digress).

try     conn.open()      da = new mysqldataadapter(sqlqry, conn)       dim cb mysqlcommandbuilder = new mysqlcommandbuilder(da)       da.fill(ds, "big_table")      datagridview1.datasource = ds     datagridview1.datamember = "big_table"      catch ex common.dbexception         msgbox(ex.tostring)          conn.close() end try 

the above works fine, not not need 100+ fields displaying. want player name, level, if online , few other fields show - here can select row , process data elsewhere in program.

hope made sense :-)

edit: clarification: need know how, @ run time, create datagrid accept results of query not display whole record.

is possible specify fields in query *? declare sqlqry like:

select player_name, level, online_status, a_few_other_fields players; 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo