strsql="select Name,CName from Task where Name like '%" & request.QueryString("PrintName") & "%' and CName Like '%" & request.QueryString("PrintName") & "%' group by name"
but it doesn't work and i get this error:
You tried to execute a query that does not include the specified expression 'CName' as part of an aggregate function.
When I just - SELECT DISTINCT atblProducts.ID AS ProductID, it selects distinct Product IDs but when I add other columns to the select, it doesn't select the ProductID as DISTINCT.
I have a asp app that I wish to limit execution access to a universal security group during beta test... I've tried restricting permissions using ntfs, the virtual directory and the net.config file (which I assume will not work as this is not a vb.net app).
I have a catalogue table and forum table in my database. In the cata table , it has ASP, PHP, JSP 3 record. In the Forum Table, it has ASP intro, ASP Install, PHP intro, PHP install 4 record. I want to group the ASP intro, ASP install in the ASP group and The same with the PHP group. How can i do ? ( By ASP ) . ( Could you please give the asp source code to get the data from database by group ? When the Cat_ID at the 2 table is equal, they are in the same group)
I have a asp page that I need to check to see if the current logged on user is a member of a specific active directory group. How can I do this? I have tried so many different LDAP code examples and none seem to work.
Do I need to include a administrator username and password in the code? Does any have any samples of code I can try?
I have this problem with table of database MySQL. My table with fields ID, Number and Description: Code:
ID ====== NUMBER ======= DESCRIPTION 1 ====== 9168381650==== CDR VER-CS AP-UPS SANLUCA 2 ====== 9168381659==== CDR VER-CS AP-UPS SANLUCA-9 3 ====== 9168381651==== CDR VER-CS AP-UPS SANLUCA-SQ S.SANLUCA 4 ====== 9168381652==== CDR VER-CS AP-UPS SANLUCA-SQ DIST.GUSPIN From this table I need to have the total of records data all under the description CDR VER AP-CS-UPS SANLUCA.
Is a hierarchy structure where IDs 2, 3 and 4 belong to the description ID 1. I don't like to see the data individually for each description, but the grouping data for macro-DESCRIPTION. For example:
The total records in table are 4, the query return: "There are 4 records total for description CDR VER AP-CS-UPS SANLUCA."
I have a asp page that I need to check to see if the current logged on user is a member of a specific active directory group. How can I do this?
I have tried so many different LDAP code examples and none seem to work. Do I need to include a administrator username and password in the code? Does any have any samples of code I can try?
I have the following statement that is working just fine:
SQL = "select* from products GROUP BY name ORDER BY price"
I have many products with the same name but with different prices and I want to display unique records along with other information but I want to display the cheapest product first. It is displaying the first record in the table with that name but not the cheapest distinct record in the list of all distinct product names. Code:
I am writing a report using ASP and am having trouble displaying the data in the way i want. I'm collecting turnovers for various companies and each of the companies has a county code. e.g. Yorkshire is defined as number 2.
I need to group the companies together by county and need to display a totals line for those members only and then on the following lines I want the next county and its companies.
I can group the counties together but the totals line I'm displaying appears after each companies rather than after the group of companies for a given county.
I use a do while loop to check that there is data in the database for each company. I tried putting the totals line outside the loop and that only shows 1 totals line for ALL companies.
I am trying to show some stats. However I have four levels to choose from, which are shown as true/false. I want to count each entry by employee and categorize it only under the highest level achieved. One entry can have multiply Levels. Hope this make sense my mind is a little foggy today.
Here is the sql statement I am using. I have added the levels as or however I want to count each level but only the highest level achived. I don't know if it would be easier to do this in a SQL statement or in vb script. Code:
The query works fine without ordering. But when I try to put ORDER BY that error message appears.
My query is working when it looks like that:
"Select TAB1.WCUST, TAB2.name, sum(TAB1.qty) AS SUMQty, sum(TAB1.wamt) AS SUMWamt from TAB1 LEFT JOIN TAB2 ON TAB1.WCUST=TAB2.name Where TAB1.WMNID=10 GROUP BY TAB1.WCUST, TAB2.name;"
But after I add ORDER:
"Select TAB1.WCUST, TAB2.name, sum(TAB1.qty) AS SUMQty, sum(TAB1.wamt) AS SUMWamt from TAB1 LEFT JOIN TAB2 ON TAB1.WCUST=TAB2.name Where TAB1.WMNID=10 GROUP BY TAB1.WCUST, TAB2.name ORDER BY sum(TAB1.wamt) DESC;" it gives me the error message:Invalid use of group function.
How do you group multiple rows from a sql recordset on a unique id in ASP? (ie: I get 5 rows for id=9, but just want to display the top row based on my Order By).
i need to creat a user group, where as members can log in and discuss issues, like here (asp forum). I need to do it from A to Z,i found this link :http://www.siteexperts.com/tips/com.../ts02/page2.asp, but i didn t find my way yet
i want to display the number of people logged on at each location... when someone logges in they get a type=1... that works great but when i try to group by the NasName thats the location name.. Code:
I have done ASP for a while but never found a quick way to handle this issue.I have 8 dropdown boxes. Is there an easy to check that only 1 has selected 'Yes' and the others are 'No' without checking infinite combinations?I usually do this with alot of coding for the combinations.
I have an intranet site, and I need to control certain pages with NT Group permissions. I need to check that when a page is loaded, if the user is a member of the right NT Group, then the page displays, else an access denied page displays.
I am having trouble with the bit of code that gets and checks the users NT Group. I can get and check their Domain and Username, just not the Group.?
i can use Request.ServerVariables to check the login user. is it possible to check whether the login user is the member of the NT security group? it is because i wish to create a dynamic banner according to respective NT security group.
I'm rather new to ASP and am having trouble with implementing a group membership check in one of my functions. I have this function which I use for authentication pass-through: Code:
I am working in ASP.NET and I do have groupname of TrainReport for all of my radiobuttons. I have found lots of documentation of how to put groupnames in radiobuttons. What I have not found is how programmically I can use the radiobutton groupname in the code to distiguish between the radiobuttons.
In VB 6.0 the group of radiobuttons would have the same name and would be refered to in an index by the order of the buttons. TrainReport(0), TrainReport(1), TrainReport(2), etc. I could use case statement on the index.
Case 0 would be if TrainReport(0) was selected and I would have code I want to do if this was selected, Case 1 would be if TrainReport(1) was selected and I would have code I want to do if this was selected, etc.
I have not found in documentation in Visual Studio, google searches, etc. a useful purpose of radiobutton group names.
I'm developing a page in which different users have different rights within the site. I don't even know where to start with this one because searching for anything to do with "website", "user", "rights", "permissions" or anything along those lines gives me nothing but server file permissions.
What I'm trying to do is allow anybody with a username and password to sign in, then based on their security permissions they will be able to use certain functions of the website. I want all this to be modular though...
I don't want a million IF's in my asp code. What I'm looking for is to have a list of groups, each having a checklist of functions they can perform. Assign a user to a group, and they can do those tasks.
I would like to send the same email to every email address that I have in a table.Only complication is that some records have an email address and some don't (some people dont have email addresses.
I had a go and made an array and used the len(email)>0 idea, so that if no email address, skip sending and email. Guess just after some standard code, nothing fancy. The site is on a commercial server running win 2000 .
I have a question concerning ASP classic. I'm trying to add an existing user in active directory to an AD group using a web-based form. Using regular code to do this, I get a general access denied error, upon which further research told me I needed admin rights in order to accomplish the task.
I vaguely remember an ASP project I worked on in the past where the script itself authenticated to active directory before requesting information. Is it possible to authenticate to AD (as in, authenticating with my username/password which has access to add users to this specific AD group), then continue with the commands that way? I've resurrected a bit of code from that prior project, and attempted to mix the two together: Code:
I have a group of radio buttons with the same name (which are in turn generated by the database). Since they share the same name, I can select only one of them.
Now I have another radio button which is not a part of the above group, but this radio button opens up a report which has different set of parameters to open a crystal report.
Now I want to know how to select only one radio button. Either from the group or this single radio button. User can select only 1 radio button at a time. Code:
I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".
I have the code correct for grouping by location. That code looks like this: Code: