question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i need return DataTable

See original GitHub issue

hi

how can use DataTable to call store for store procedure not like #1645

	public static IEnumerable<DataTable> spReportpAGEvISITcOUNT(this db dataConnection)
		{
			return dataConnection.QueryProc<DataTable>("spName");
		}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sdanylivcommented, Mar 2, 2020

Everything can be found in StackOverflow and analyzing linq2db extension methods:

var dataTable = new DataTable();
using (var reader = dataConnection.ExecuteReader("spName", CommandType.StoredProcedure))
{
	dataTable.Load(reader.Reader);
}
0reactions
gpgpublickeycommented, Dec 27, 2022

Hi guys @sdanyliv is this suitable for TVP output returned values? Would you mind to show an example about how to retrieve data from an executed stored procedure returning an TVP output parameter ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Method returning DataTable with using
Yes, the DataTable will be disposed when the code exit the using scope. You should move the using to your main() public static...
Read more >
RETURN DEF — DataTables forums
I think you will need to make sure to return {"data":[]} from your custom delete button for the row to be removed from...
Read more >
Function Returns DataTable Using C# - TutorialsPanel
Below is a function that returns a DataTable using in C#. DataTables are derived from the namespace System.Data.
Read more >
Method that returns Datatable object passing sql and ...
Generic method to return data from database: With this method we fill a DataTable object with the result of a sql query, and...
Read more >
return a datatable from a function in C# | Experts Exchange
I want return a datatable from a function, but it has error. Table1 not returned. private static DataTable GetDataTable(Guid recordId)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found