create proc showdb as begin SELECT top 4 name,database_id FROM sys.databases for JSON auto end GO
SqlCommand Objcmd = new SqlCommand(); Objcmd.Connection = ObjConn; Objcmd.CommandType = CommandType.StoredProcedure; Objcmd.CommandText = "showdb"; Objcmd.CommandTimeout = 0; SqlDataAdapter ObjAda = new SqlDataAdapter(Objcmd); ObjAda.Fill(dset);
for JSON auto
dset
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)