VB6 SQL Field Data to ListView box? -


i need add sql data field listview box. have @ moment. unsure on how add data listview box list.

option explicit  private sub commandbutton1_click() dim connectionobj adodb.connection set connectionobj = new adodb.connection  dim rs new adodb.recordset dim cmd adodb.command dim sqlstr string    connectionobj.cursorlocation = aduseclient connectionobj.open "provider=msdasql;dsn=svr-testsql-01_sql2008r2;database=webvanilla;uid=webuser;pwd=1209sawedxz1209;"  sqlstr = "select top 10 * defactouser.f_gl_events"  rs.open sqlstr, connectionobj, adopenkeyset  msgbox "connected" & rs.recordcount   if rs.recordcount > 0     rs.movefirst while not rs.eof     'add list view box command data = rs.fields(0)     rs.movenext loop end if 


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -