Using VB to read SQL Server database into JSON format -


i trying call http://localhost:26006/api/home/getemplist in html array of key value pairs of data table employee. have class model of employee contains properties each column (name, address, phone number). know i'm not close, advice appreciated. new @ programming , trying understand.

    dim conn string = "server=timepc; database=timeclock;trusted_connection=true"     <httpget>     public function getemplist() list(of employee)         dim querystring string = "select * employee"         dim result new datatable          using connection new sqlconnection(conn)             dim command new sqlcommand(querystring, connection)             connection.open()             using adapter new sqldataadapter(command)                 adapter.fill(result)             end using          end using         return result     end function 


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -