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...Using Modules a...Using Modules a...Error using SqlGridSelectedView (Tressleworks)Error using SqlGridSelectedView (Tressleworks)
Previous
 
Next
New Post
8/10/2011 12:34 PM
 
Hi,

I'm trying to enable my users to add, edit and delete records using the SQL Grid Selected View module from Tressleworks, however, when I try to add a dummy entry, I get this error: ExecuteScalarSQL: Incorrect syntax near 'Name'.

Here's the SQL:

Insert into third_party_phone_list (
  Company Name,
  Contact Name,
  Reference/Account Number,
  Telephone,
  Telephone 2,
  Email Address,
  Website,
  Login / Username,
  Password)
Values (
  'Testing create',
  'Another name',
  'Another reference',
  '01256 000000',
  '',
  'another.email@solarsoft.com',
  'www.solarsoft.com',
  '',
  '')

Last SQL Commands:
0: Select top 1 * From third_party_phone_list
1: Select top 1 * From third_party_phone_list
2: Select top 1 * From third_party_phone_list
3: Insert into third_party_phone_list (   Company Name,   Contact Name,   Reference/Account Number,   Telephone,   Telephone 2,   Email Address,   Website,   Login / Username,   Password) Values (   'Testing create',   'Another name',   'Another reference',   '01256 000000',   '',   'another.email@solarsoft.com',   'www.solarsoft.com',   '',   '')



Please can someone advise on what I'm doing wrong?

Thanks in advance.
 
New Post
8/10/2011 1:21 PM
 
The spaces in your column names are easily avoided by something like CompanyName or Company_Name, or Telephone2 instead of Telephone 2.

But if you have to have them, use square brackets like this [Company Name] in your select and update sql statements.

Please note that this is not an SGSV issue per se but rather an issue with SQL Server and your naming conventions.

pmgerholdt
 
New Post
8/15/2011 11:42 AM
 
Thanks, Michael.

Now I have another issue, albeit a minor one. When I update a row using the controls added by the above, it always selects the first record and its values, whereas I need it to return the values of the row that the user clicks to update.

Any ideas? Probably something simply, I'm sure.
 
New Post
8/16/2011 7:22 PM
 
This sounds like a question for Paul at Tressleworks - he is very responsive to the forums there.

pmgerholdt
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Error using SqlGridSelectedView (Tressleworks)Error using SqlGridSelectedView (Tressleworks)


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