Reputation: 1 Apprentice
- New Members
- Active Posts:
- 11 (0.01 per day)
- 27-June 12
- Profile Views:
- Last Active:
- Nov 13 2013 03:35 PM
- Dream Kudos:
Posts I've Made
Posted 9 Oct 2013The error message should give you some indication of where the error is. I don't use ASP.NET but assume you can press Break, or similar, and it will take you to the error.
The error message itself suggests that you have a missing, or extra, bracket, or some similar simple syntax error which shouldn't be too difficult to spot.
BTW What's all this..
Eek! /> Use css if you want to separate elements.
The was auto written using the .net suite. I didnt write that code. This is just page spacing however, and is not of concern. I really dont care about that. My concern is getting the query to work and displaying the datagrid. I can tweak html later if necessary.
I'm afraid this is more complicated than an extra bracket. This very same query works fine when I run it in SQL Server Management Studio directly against the database. For whatever reason, it doesnt like the line below.
sqlRead = sqlCmd.ExecuteReader()
Posted 7 Oct 2013
Posted 16 Aug 2012
SELECT [fldAppName] as 'Application', [fldGroupName] as 'Group Name', [fldAppSymID] as 'Symposium ID', [fldAppPhone] as 'Phone', [fldAppPhoneOpt] as 'Options' FROM [tblApplication] WHERE ([fldGroupName] = @fldGroupName) ORDER BY [fldAppName]
You're giving an alias to your columns. The boundfields will be looking for the alias name not the real column name. You would need to bind to "Application" instead of "fldAppName". Either that or remove the aliases.
Thanks for all the help, Nakor. I found that once I changed this to use the Alias it worked, but took me back to the original error that I mentioned in the first post of this thread. After much use of Google I found this was being caused by the spaces in my alias'. Once I replaced the spaces with underscores...voila. I actually ended up removing all of the alias' and manually defining my columns in the gridview and setting the "HeaderText" property with what I wanted them to display as. The worked perfectly. Thanks again for your help.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
gns1497 hasn't added any friends yet.