R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Display Insert Error Message
Last Post 11 Mar 2009 03:02 PM by svedire. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
radcoder1User is Offline
New Member
New Member
Posts:24

--
28 Nov 2008 10:57 PM  
I'm using ListX to insert data into a table - but sometimes the user might try to duplicate the primary key. In this case it just fails and the user doesn't know. How can I let the user know that their insert failed?
svedireUser is Offline
Basic Member
Basic Member
Posts:128

--
11 Mar 2009 03:02 PM  
Hi,

Sorry for the late response.

You can do it in the following way: Give a name for the insert query that you executed. For example, INSERTQRY. You can check whether insert succeeded or failed using [INSERTQRY.isSuccessful,Action] - returns true or false. The actual error is returned in the [INSERTQRY.Error,A]

Under Actions:
INSERTQRY: INSERT INTO MyTable VALUES(@Col1)

So, you can display the error using [INSERTQRY.Error,A]

You can also refer to the ListX documentation (page no. 52)

Thanks,
Sindura
R2integrated
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share