Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...MODULES: INSERT & UPDATE?MODULES: INSERT & UPDATE?
Previous
 
Next
New Post
7/13/2007 11:21 AM
 

Using sample "Guestbook" module for tutorial on building modules.
Have code that presently works with viewing database information.
But I am in need of adaquete feedback on how to properly INSERT data & UPDATE data
within the SQL database. 
I am familiar with queries, but have found this to be structured to be a bit different.
Noticed that mySqlString.Insert is a tag, but assuming it needs different "dims" and other tags to work properly.
Sufficient feedback on Inserting and Updating sql data would be appreciated.

Code for viewing data:

Dim mySqlString As New StringBuilder()

mySqlString.Append("SELECT FriendlyName, Description ")
mySqlString.Append("FROM {databaseOwner}{objectQualifier}DesktopModules ")
mySqlString.Append("WHERE Description like '%' + @SearchString + '%' ")
mySqlString.Append("ORDER BY FriendlyName")

Dim myParam As SqlParameter = New SqlParameter("@SearchString", SqlDbType.VarChar, 150)
myParam.Value = SearchString

Me.GridView1.DataSource = CType(DataProvider.Instance().ExecuteSQL(mySqlString.ToString(), myParam), IDataReader
Me.GridView1.DataBind()



What would the code, dims, and all necessary tags be for INSERT commands?

What would the code, dims, and all necessary tags be for UPDATE commands?

 
New Post
7/16/2007 10:21 AM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/16/2007 10:24 AM
 

Wow I just realized that DynamicForms does not have a single update. I have update examples here:

Super-Fast Super-Easy Module (DAL+)



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/18/2007 1:12 PM
 


Already have multiple databound datagrids that interact with one another.
Yet, they will not update at the same time. I have been forced to create extra buttons as a work around.

Here is the problem: (mapped out for easy understanding)

DATAGRID1     INSERT                        DATAGRID2     UPDATE

- DATABRID2 is pulling data from DATAGRID1
- When "Page Loads", DATAGRID2 refreshes database
- When clicking "UPDATE", DATAGRID2 refreshes database
- BUT, when clicking "INSERT", DATAGRID1 inserts information, BUT DATAGRID2 doesn't update.

All I can think, is that because data is being inserted, maybe running the collection needs to be after.
I took working code of ShowData("") & I did place it after insert command.
Also tried with multiple Me.ShowData commands as well as noticed that there was no Handle assigned to this sub.
Yet on other commands without Handles (running ShowData("")) still display.Which prompts these questions:

1. If assigning values to database, and within same command, telling another table to refresh, is this possible for data to be instantly visible wit refresh?

2. What is code for: when one button clicked, it assigns value of other button being clicked? (because same code is not working)

3. Is an incrimental timer an option?  Say every 1 minute?  What is code?

4. What do you think is best for getting this button to serve two functions?
 



-Machina12

 

 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...MODULES: INSERT & UPDATE?MODULES: INSERT & UPDATE?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out