Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
samitkumbhani
Starting Member
15 Posts |
Posted - 2004-11-03 : 15:19:29
|
| Hi,I am trying to design a page that gets data from the database and displays it.I am having a typical issue:There are multiple querries running on the same page. It happens that one queery (y) which is written below a particular querry (x)shows the result before the above querry.So say in the page the order of querries written is as:XY......Now when i execute the page the result comes something like this:YX......I just want the querries to execute in the order they are listed in the code.I guess it is some buffering problem.Please suggest me away out of this.I am using ASP and SQL server.Thanks,Samit |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-11-03 : 15:32:41
|
do you hava an if ... else... or something like that??post the code that will be the fastest way for you to get an answer.Go with the flow & have fun! Else fight the flow |
 |
|
|
samitkumbhani
Starting Member
15 Posts |
Posted - 2004-11-03 : 15:40:22
|
| Hi,Thanks for the prompt reply...Below is the code<% for each x in rsOrganizationDetails.fields %> <tr> <td> <%response.Write(x.name)%> </td> <td> <%= x.value %> </td> </tr> <%next rsOrganizationDetails.close() %>/*****************Querry 1 ends *************//****************** querry2 begins *************/rsDepartmentName.source = "select DepartmentName, Organization.DepartmentId, Department.DepartmentID from dbo.Organization,dbo.Department where OrganizationId ="&OrganizationId & "and Organization.DepartmentId = Department.DepartmentId"rsDepartmentName.Open()%><%response.Write(rsOrganizationDetails.Fields.Item("DepartmentName").Value) %>/****************************************************/it happens the department name is listed above the result of querry1 |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-11-03 : 15:44:32
|
that's because the first query is in a table <tr>...</tr>and the second is not.by default all data that is not in tables are put on top of the page.Go with the flow & have fun! Else fight the flow |
 |
|
|
samitkumbhani
Starting Member
15 Posts |
Posted - 2004-11-03 : 15:49:24
|
| Hi,Thanks a lot....that was the problemgot id done nowthanks againsamit |
 |
|
|
|
|
|