Table Value parameter equivalent in Mysql for c# - mysql

wanted to ask if there is any Table Value parameter equivalent in MySQL through c# ADO.Net.
aim is to send list of custom object to mysql stored procedure at once in an attempt to make the whole process a little more efficient.
any help appreciated

Related

is it possible to pass a multiple database tables as a input to stored procedure in mysql

By using input_data_1 parameter I'm able to pass only one database table as a input to stored procedure and I'm fitting the forecast model using R language.
I have to use more than one database table in my stored procedure, but I'm not able to do that.
I spent lot of time to solve this but I couldn't, furthermore I don't have enough knowledge on SQL.
Can anyone help me to solve this?

MySQL Stored Proc Refactoring - Extract Method

I have some logic in a stored procedure (MySQL) that is calculating 8 variables that I now want to reuse this logic is another stored procedure. I want to 'extract method' this piece of logic in to a separate stored proc and then call it and store the results in the caller, in perhaps a temporary table. Does anyone know of a pattern to do this?
I've read up that you can can't store any results when you simply CALL proc_name(); etc, so I'm wondering what the most elegant way of doing this is?
Thanks.

SSRS call stored procedure using ReportItems! textbox. Maybe custom report code?

I need to call a stored procedure during my report to insert values into a table. These values are the result of fields from the dataset added. For example, I have a row of values, and the far right column is "ReportItems!TextBox1.Value + ReportItems!TextBox2.Value ..." This gives the correct total on the report. Now I need to call a procedure using this value as a parameter.
Using a stored procedure as a dataset, I am unable to reference the ReportItems! I am also unable to create additional report parameters (even internal or hidden) which could be a result of a dataset due to the reporting infrastructure we are using.
I know using custom report code, I can call a stored procedure and also reference the ReportItems, but I have been unable to find the correct syntax. I am not familiar with VB.net so please be specific. If i could get an example of how to call: Procedure TEST_INSERT(ReportItems!TextBox1.Value), I would be able to figure out how to implement it.
I am using an oracle backend as my data source.
Thanks
If I've understood you correctly, you want to do an database update using a value calculated with an expression in your report. My answer to this would be threefold.
First up: don't do it!.
Second: seriously, don't do it!! Reporting services is not meant or well suited for this kind of task, you most likely are looking at an XY-Problem.
Third, if you insist on doing it anyways, the easiest way I can think of to accomplish that is by using a seperate report to trigger the update, and pass the value you're after into a parameter for that report. In the main report, you set a click action on the cell with the total that calls the report, with the same value into the parameter.
A similar setup which may work as well, is to create a parameter based on the first dataset with that same "sum" expression you mention, and pass that down to another dataset.
However: don't do it! ;-)
I would set up a dataset in the report service that calls an update or insert function in oracle and returns a value/s. This way you can send in the total you need calculate and produce a result telling the user if the update was successful.
There is no special method for doing this just select or enter your procedure name and refresh the fields to update the parameter/s. See Oracle stored procedure in SSRS.
Also using this method you can run the stored procedure in oracle, update the table and display the results.

SQL Server: How to pass data table to a stored procedure as an input parameter?

I have a data table which is filled within my application with some values that user has entered them via an excel file. My Application targer .net framework is 2.0 and I can NOT change it to 3.0 or 3.5 in order to use LINQ feature.
So, I have to send my data table values to a stored procedure and contribute them in a join operation.
Is it a good solution or not? If yes, How can I send my Data table to Stored procedure as an input parameter?
Thank you
By using table-valued parameters you can send data to the SQLServer stored procedure. This user-defined type represents the definition of a table structure and is compatible with SQLServer 2008 and next versions.
You can find example and more information referring to this msdn aritcle
Large Complex: For large complex data I'd probably get your data into a *.csv file (if it's not already that way in Excel), use .Net to BCP it into #temp tables, and then on that same connection call the proc and have the proc always know to look for the data in the #temp tables. BCP is the fasted way to get large chunks of data into SQLServer.
Medium Size: If the size of the data is small then you could format it as XML and send that to the proc. Here's a quick example using C# http://www.a2zdotnet.com/View.aspx?Id=107
Small Delimited: For small list type data you might be able to get away with sending it as comma delimited string of values. This is very handy when sending a list of ID's to a proc (http://blog.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx)

Dynamic Linq - query a schema that is only known at run time?

I know with dynamic linq you can construct expressions dynamically in the same way that you might build and execute a dynamic SQL statement - e.g. a dynamic where clause or a dynamic select list. Is it possible to do this in cases where the schema is not known at compile time?
In a database I'm working with users can define their own entities which causes new tables/columns to be created in the back-end database. At run time I'll know the table & column names I need to work with but I won't know the schema at compile time hence I can't build a DBML to work with up front.
Is there any facility for the dynamic discovery of the schema at run time or is this a case where I need to stick with building dynamic SQL statements?
As far as we understand, you don't know neither schema name nor the full structure of your schema for sure.
In this case it seems that the strongly-typed ExecuteQuery method overload will be an option.
Just write the SQL queries and add the necessary parameters (like table and column names) either using string concatenation or as parameters.