I follow sql coding for cascading combo boxes that populates them if the first one populates the cdname the second one should populate the cd group and the third one the composers with the songs or the samthing with music hymnals. I am trying the steps they aren't populating. Where are simple books on this?
Hi, i have created a database in VB05, i have a form and a few combo boxes. I am a total newbie to this so i only know the total basics.
two tables i have are Ratings and films.
Ratings: RatingID Rating
Films: filmID Title ratingID
above are the columns of my tables.
what i am trying to do is select a rating on the first combo box which will then only show the titles with that rating in the next combo box.
I have the whole database created, i have the relationships in place and the combo boxes are all connected to the datasources etc. The comboboxes are currently filled with data by the default sql query which is created. But it is showing the whole data for each when i only want to show the film titles for what rating is selected.
Hi folk.. can some body help me with this problem..???
I have a grid view on a form which has got colums which are set as data combo boxes. and a third column whish is set to a text box. all the 3 controls on the datagrid view are bound with sql server table. they are asociated with two saparate tables within 1 database... now what i want is that the user of the application can select either combo box 1 of teh 2nd combo box. and automatically the syncronize and also the text column asociates with related data..
for example
Country City Pincode India vasco 403802
now while flling the grid vew.. the user can select either country or city.. automatically both syncronize with related data and so does the text box.
How do you create a drop down box on the report so the users can chose a value and conduct their search according to that value, See I have a SP that when the users enter a parameter they get the results according to that paramter, I would like for the choose one rather then type it up. Can anyone help please
I have a Ms Access interface (which is connected to a sql Server database server),I create a new proc for one Access combo box and I used it in Access interface. It works fine if I log in as 'sa' but not other user. Other user can't see the combo box list at all.I grant the security for the user to execute the new proc.
Currently my select will return multiple districts for each of the users. I would like to combine the multiple districts into one string field.
Current proc:
ADName DistrictID
Glenn Stalions 9
Bob Smith 9
Pam Cassidy -1
Shannon Sanchez 1234
Shannon Sanchez 1355
Change to:
ADName DistrictID
Glenn Stalions 9
Bob Smith 9
Pam Cassidy -1
Shannon Sanchez 1234, 1355
If the user is managing more than one district the proc would return a single feild with a csv string of all districts.
I have tried pivot's and it returns multiple columns which I don't want. In addition, I have to hard code 300+ district id's to get the pivot to work correctly.
Something like this will work but I want to call it each row and not for the entire proc: declare @csv varchar(max) (SELECT @csv = coalesce(@csv+', ','' ) + cast(districtid as varchar) FROM #district) select @csv
I have a textbox, combo box, and a button on a form. I would like to perform a different query depending on the combo box selection. I thought I could do something such as: if (cboSearch.Text == "Selection1") { scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection1"; } else if (cboSearch.Text == "Selection2") { scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection2"; } else { scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection3"; } However, this obviously does not operate as I would need it to. What is the proper method for conditional SqlCommand statements like this?
Hi, I am doing a report in which i have to create Wall chart kind of layout and for that i have to place Text Boxes on the report at run time.Now In my Layout i have some Text Boxes which are going Out of the page(Starts from page 1 and Ending on page 2)but when i am looking my report in the Print Preview the Report Viewer is shifting the entire Text Box to Page 2. Can i do something to print the report as they are seen in the Normal layout.
I have a combo box where users select the customer name and can eithergo to the customer's info or open a list of the customer's orders.The RowSource for the combo box was a simple pass-through query:SELECT DISTINCT [Customer ID], [Company Name], [contact name],City,Region FROM Customers ORDER BY Customers.[Company Name];This was working fine until a couple of weeks ago. Now wheneversomeone has the form open, this statement locks the entire Customerstable.I thought a pass-through query was read-only, so how does this do atable lock?I changed the code to an unbound rowsource that asks for input of thefirst few characters first, then uses this SQL statement as therowsource:SELECT [Customer ID], [Company Name], [contact name],City, Region Fromdbo_Customers WHERE [Company Name] like '" & txtInput & "*' ORDER BY[Company Name];This helps, but if someone types only one letter, it could still bepulling a few thousand records and cause a table lock.What is the best way to populate a large combo box? I have too muchdata for the ADODB recordset to use the .AddItem methodI was trying to figure out how to use an ADODB connection, so that Ican make it read-only to eliminate the locking, but I'm striking outon my own.Any ideas would be appreciated.Roy(Using Access 2003 MDB with SQL Server 2000 back end)
I have a store procedure that pulls info for a meeting coming up. They can choose their meal choice which in this case is fish, chicken, beef. What is happening on the report, it's listing each person 3 times with each choice no matter which is was. How do I correct this? Code below:
CREATE PROCEDURE [dbo].[spGetCourseEmailList1]( @Code1 char(9)) AS SELECT DISTINCT dbo.[names].lname as LastName, dbo.[names].fname as FirstName, dbo.[evser].ses as MealChoice, dbo.[evldg].paid as AmountPaid, dbo.[names].gp as PreferredAddress, dbo.[names].mi as MiddleInitial, dbo.[names].nname as NickName, dbo.[names].xname as Suffix, dbo.[names].hphone as HomePhone, dbo.[names].email as EmailAddress, dbo.[names].addr1 as HomeAddress1, dbo.[names].addr2 as HomeAddress2, dbo.[names].city as City, dbo.[names].st as State, dbo.[names].zip as ZipCode, dbo.[firms].fname1 as FirmName1, dbo.[firms].fname2 as FirmName2, dbo.[firms].faddr1 as FirmAddress1, dbo.[firms].faddr2 as FirmAddress2, dbo.[firms].fcity as FirmCity, dbo.[firms].fst as FirmState, dbo.[firms].fzip as FirmZip, dbo.[firms].fphone as FirmPhone, dbo.[names].udflist1 FROM dbo.[firms] INNER JOIN dbo.[names] ON dbo.[firms].firm = dbo.[names].firm INNER JOIN dbo.evldgON dbo.[names].id = dbo.[evldg].id INNER JOIN dbo.evregON dbo.[evldg].id = dbo.[evreg].id INNER JOIN dbo.evserON dbo.[evreg].code1 = dbo.[evser].code1 WHERE dbo.[evldg].code1 = @Code1 AND dbo.[evreg].code1 = @Code1 AND dbo.[names].xwebflag <> 'Y'ORDER BY dbo.[names].lname, dbo.[names].fnameGO
Wondering on how to script over the passwords from one 2000 box to another. We are cutting a box over from dev to production and need to copy userids and passwords from another box.
I have created several reports using sql server that have the end user enter a start and end date to run the query. I was just wondering if there was a way to just have a drop down/combo type box instead so the user could just pick the date instead of having to type one in.
I am a 2 node active/passive 2003 cluster. I have some maintenace where I need to shut down both of the servers at the same time.
Has anyone experience any issue in this approach?
I am planning to take the cluster offline and then shutdown the servers and bring it online after the reboot. I am also running SQL so any concerns or tips as what would be the best scenario.
I am have a reporting server which connects to a analysis server which connects to a sql server and a db2 server. I am using windows integrated security all the time except for the DB2 connection. That is a fixed username/password.
Reporting server (RS), analysis server (AS) and sql server are all on the same machine.
I created a local group and added the correct users to it. I gave that group browse rights on the reports so that works correctly.
I created a role in AS and added that group to that role. Gave all read rights to that role.
I created a login for that group on the SQL server and gave that group db_datareader role.
When I connect as an administrator every reports runs fine.
When the test user connects they can browse the reports but the drop down boxes for the parameters are empty.
I have a ABC service on a server1 that is dependent on MSSQLSERVER service running on server2. Does anyone know how to setup the service ABC on server1 to have a dependancy on MSSQLSERVER running on server2?
I am trying to query only the Max date dependant on quantity
Create Table dbo.TestParts (Part char(30), Desc1 char(50), Desc2 char(50)); Create Table dbo.TestStructure (Model char(30), Part char(30), EDATE smalldatetime, QtyPer float); GO Insert INTO dbo.TestParts Values('101111','Widget A', 'Batteries Not Included'),
[Code] ....
Looking for a return of:
PART Description EDATE QtyPer 101112 Widget B ..... 2012-12-03 3 101113 Widget C ..... 2012-12-03 5 101114 Widget D ..... 2012-12-01 1
Widget A should not show because the last date the qty was changed to Zero
Closest that I have come..........(which is pulling the part 101111 which should be incorrect)
Select ts.Part, RTRIM(tp.Desc1) + ' ' + RTRIM(tp.Desc2) as Description, ts.EDATE, ts.QtyPer FROM testing.dbo.TestStructure ts Inner Join (Select Part,MAX(EDATE) as Date FROM testing.dbo.TestStructure WHERE QTYPER <> '0'
SELECT INVENTORY_ITEM_TAB.ITEM_NO, INVENTORY_ITEM_TAB.DESCR, INVENTORY_ITEM_TAB.STATUS_FLG, INVENTORY_ITEM_TAB.PRICINGUOM, INVENTORY_ITEM_TAB.PURCHUOM, INVENTORY_ITEM_TAB.ITEM_CATEGORY, INVENTORY_ITEM_TAB.ICINTERNALNOTES, INVENTORY_WHS.QTY_ON_HAND, INVENTORY_WHS.QTY_ON_ORDER, INVENTORY_WHS.QTY_ALLOCATED FROM INVENTORY_ITEM_TAB INNER JOIN INVENTORY_WHS ON INVENTORY_ITEM_TAB.ITEM_NO = INVENTORY_WHS.ICWHSPCODE WHERE (INVENTORY_ITEM_TAB.ITEM_CATEGORY = 'SS') AND QTY_ALLOCATED, QTY_ON_HAND, Qty_On_ORDER <> 0 ORDER BY INVENTORY_ITEM_TAB.DESCR
But I don't want to select records if all of these fields have a 0 in them - QTY_ALLOCATED and QTY_ON_HAND and QTY_ON_ORDER.
how to do this type of query. If any of those fields doesn't have a 0 then I would want to return it. I just don't want them if all three of those fields have 0.
Suppose I have the following table:col1 col2hammet jonesjlo afflectafflect armandwills snoptarmand hammetjones smithIf someone choses armand, then I'd like to returnamand hammet jones smithThe first selection goes over to the second column, gets that valueand locates it back in column one and returns column 2 and so on.One way of doing it is to set up a separate query for each one andthen construct a new query to get them all.I'm thinking there's a more elegant way to do this. Any suggestionswould be appreciated.-David
I was just analysing the security which can be given to different users to access respective databases. So i tried, on my local server, to deny permission to myself to access Model database. After this i am not able to connect to my local server at all. Error: Permission denied. I am using windows authentication mode.
I have also deleted the local server registration, and re-registered it, but still the condition is same. Do i need to uninstall SQL Server completly to get rid of this prob.? I also registered a new data server, and there every thing is going fine. So now what do i do to get connected to my local server.
I have a report which uses a parameter called "Interval" with possible string values of "Daily", "Weekly", and "Monthly" and I want these values to set the default values for my StartDate and EndDate parameters. However, the default value remains static. And I have tried all of the solutions found in this forum. Any suggestions?
I am using SSRS 2005. And I have tried using an iif statement for StartDate, also tried Property->Custom Code, and also tried using stored procedure to populate Start and End Dates, but none of these provide dynamic parameter setting like I was hoping for.
And I think this should work because I know that if it is not a date that it works correctly. For example if I have one parameter called country and a subsequent one named state, every time I change the country it will let me re-pick the state. But this is not working correctly here.
Any ideas on what I am doing wrong or how to fix this?
I am not able to delete a row due to the presence of its parent table. There is no circular relationship and the child has no dependencies when I verify the Delete trigger. Any advice? See error msg below:
Msg 30010, Level 16, State 1, Procedure tD_My_child_table_name, Line 43
Cannot DELETE last My_child_table_name CI because My_parent_table_name exists.
Msg 3609, Level 16, State 1, Line 1
The transaction ended in the trigger. The batch has been aborted.
hi , In my database I have table with column of datatype nvarchar in which I am writing the address of users.Now address field in aspx page is multiline because of which my address contains characters and . These special characters are getting inserted in database as square boxes. Is their any way to avoid it. Also the constraint is that I don't want to replace or by space before writing contents to database. Please write to me any solutions u are having. thanks in advance. Thanks and regards, Nita Jadhav.
I would like a form that has 3 text boxes. These 3 boxes are going to be used for entering search criteria. The first box is for searching a field called CasePK. The second is for searching a field called LinePK and the third is for searching a field called DOS. DOS is a date field. The other two are text fields.I am using a SQLDATASOURCE and a Gridview. What will the SelectCommand look like so that I can search the 3 fields using the data from the textboxes?
Howdy all. I have a query with bizarre results in Query Analyzer.
Box1; 4 x 3.0 processors, 4 gigs of RAM. Results never come back. Box2; 8 x 3.0 processors, 16 gigs of RAM. Results never come back.
Both of the above boxes are extremely under utilized. The absolute max amount of CPU being used is 25%. Box1 had 1 gig free RAM and Box2 had 7 gigs free RAM.
Box3; 1 x 3.0 processor, 1 gig of RAM. Results in 15 seconds. Box4, all the same as box 3.
I took a backup of the DB and restored it from box to box to box, so I know everything is identical.
I once had a deadlock issue where I had to use the maxDop hint and tried that here, but it didn't help.