Results 1 to 4 of 4

Thread: How to implement sqlhelper parameter cache

  1. #1
    Join Date
    Nov 2008
    Posts
    97

    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. #2
    Join Date
    Oct 2008
    Posts
    68

    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. #3
    Join Date
    Oct 2008
    Posts
    117

    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. #4
    Join Date
    Oct 2008
    Posts
    80

    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.

Similar Threads

  1. Replies: 6
    Last Post: 12-09-2011, 11:05 PM
  2. Quad core without L3 cache vs Triple core with L3 cache
    By Diellza in forum Motherboard Processor & RAM
    Replies: 3
    Last Post: 25-01-2011, 07:30 AM
  3. JSF example url? Parameter Help!!
    By Gadin in forum Software Development
    Replies: 5
    Last Post: 21-09-2010, 10:05 PM
  4. Cache settings (intensive cache usage)
    By Valliy in forum Technology & Internet
    Replies: 7
    Last Post: 02-07-2010, 07:13 AM
  5. How to implement dns cache validity checking
    By Romany in forum Technology & Internet
    Replies: 5
    Last Post: 02-03-2010, 10:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,886,346.46700 seconds with 16 queries