|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to implement sqlhelper parameter cache I use SqlHelperParameterCache classes to handle my application DAL. This is a class which will help the application talk to the database from the presentation, For some reason my insert no longer works using the SqlHelperParameterCache.GetSpParameterSet under version 2. I thought they are used for improving performance. But I make a example to test the performance against with caching and without caching. Is there a example that uses this during data That's being edited in a textbox/ or just data in general? |
#2
| |||
| |||
Re: How to implement sqlhelper parameter cache Based on my understanding, you want to use the SQLhelper's ExecuteNonQueryTypedParams method to update the data. Here i am giving you small query that will allow you to implement your necessities. ((p.Direction == ParameterDirection.InputOutput || p.Direction == ParameterDirection.Input) && (p.Value == null)) { p.Value = DBNull.Value; } command.Parameters.Add(p); |
#3
| |||
| |||
Re: How to implement sqlhelper parameter cache The ExecuteNonQueryTypedParams method is used to execute a stored procedure. It has three parameters:You just need to pass the connection string and the database query the rest will be handled by this class. connectionString: The connection string for a SqlConnection. spName: The name of the stored procedure that you want to execute(In your case, it is your update statement stored procedure's name). dataRow: The dataRow is used to hold the stored procedure's parameter values. restoring a good set puts it back to the default configuration and any config problems can be solved that way for instance if you had bad settings, Sqlhelper will pull the parameters for this stored procedure from the parameter cache and set the parameters values from dataRow. Besides, dataRow need to contain the column name that should be the same as the stored procedure parameter's name. |
#4
| |||
| |||
Re: How to implement sqlhelper parameter cache In your case, we should write an update statement stored procedure with the TextBox's Text as parameter and then create the DataRow with the TextBox's Text. When Winsock corrupts, the networking errors that you may face include unable to surf the Internet with ?Page cannot be displayed? error message in Internet Explorer or AOL even though the DSL/ADSL/cable Internet connection is connected. |
![]() |
|
Tags: getspparameterset, parameter cache, sqlhelper |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make more space for Apps by moving dalvik-cache to /cache in Sony Ericsson Xperia Arc | Rance | Portable Devices | 6 | 12-09-2011 11:05 PM |
Quad core without L3 cache vs Triple core with L3 cache | Diellza | Motherboard Processor & RAM | 3 | 25-01-2011 07:30 AM |
JSF example url? Parameter Help!! | Gadin | Software Development | 5 | 21-09-2010 10:05 PM |
Cache settings (intensive cache usage) | Valliy | Technology & Internet | 7 | 02-07-2010 07:13 AM |
How to implement dns cache validity checking | Romany | Technology & Internet | 5 | 02-03-2010 10:30 AM |