|
Problem is solved by adding full access permisions for 'MSSQLUser' user group to the file_path directory.
|
|
|
|
|
Dears,
I have problem in geting record from SQL SERVER 2000
I am using stored procedure with (READPAST) in query
Ex select top 100 * From T_table with (READPAST)
and im using lock for some record
i want to get unlocked records using READPAST
and get error in .net
Message: You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels.
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
I don't no where to post this question please help me
I am facing this problem from last two days
while opening report from my website i am getting following issue this was working fine on our test server
but in client machine we are getting this issue
System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
i am using vs2005 and sql2005 reporting services
i checked on client machine report is opening from report manager
and anonymous user chek box is checked and windows auth check box checked
we have one user reportadmin he has rights browser also and this user also have rights in reportserver db with resexe role .
this id my cod
protected void Page_Load(object sender, EventArgs e)
{
BreadCrumbs.MenuItemID = ModuleID;
HdnParameters.Value = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType;
RVReferralListing.BorderWidth = 0;
if (!this.IsPostBack)
{
int referralID = 0;
if (Request.QueryString["ReferralID"] != null)
{
referralID = Convert.ToInt32(Request.QueryString["ReferralID"]);
FillSubReport(referralID);
}
if (referralID == 0)
{
PnlSearchBasedControls.Attributes.Add("style", "display:''");
divMainReport.Attributes.Add("style", "display:''");
divSubReport.Attributes.Add("style", "display:none");
}
else
{
PnlSearchBasedControls.Attributes.Add("style", "display:none");
divMainReport.Attributes.Add("style", "display:none");
divSubReport.Attributes.Add("style", "display:''");
}
Session["ClientAccessData"] = Convert.ToString(Session["UserID"]) + "-" + Convert.ToString(Session["ProviderID"]) + "-" + ViewDataAccessType;
}
}
private void FillSubReport(int referralID)
{
RVReferralSubReport.Visible = true;
RVReferralSubReport.BorderWidth = 2;
Uri ur = new Uri(Convert.ToString(ConfigurationManager.AppSettings["ReportServerUri"]));
RVReferralSubReport.ServerReport.ReportPath = Convert.ToString(ConfigurationManager.AppSettings["ReportPath"]) + "/ChldReferralServicesReport";
RVReferralSubReport.ServerReport.ReportServerUrl = ur;
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("ReferralID", referralID.ToString(), false));
RVReferralSubReport.ServerReport.SetParameters(paramList);
}
protected void btnViewReport_OnClick(object sender, EventArgs e)
{
string clientID = "";
string stateID = "";
if (txtClientName.Text.Trim() != "")
{
if (CheckIfExists_ClientName(txtClientName.Text) == "Empty")
{
hdnClientIDTyped.Value = "";
lblWarning.Text = "Please select valid client name from the list.";
ScriptManager.GetCurrent(Page).SetFocus(txtClientName);
txtClientName.Text = "";
MPEWarning.Show();
return;
}
else
{
hdnClientIDTyped.Value = CheckIfExists_ClientName(txtClientName.Text);
}
clientID = hdnClient.Value.ToString() != "" ? hdnClient.Value : hdnClientIDTyped.Value;
}
if (txtState.Text.Trim() != "")
{
if (CheckIfExists_State(txtState.Text) == "StateError")
{
hdnClientIDTyped.Value = "";
lblWarning.Text = "Please select valid state from the list.";
ScriptManager.GetCurrent(Page).SetFocus(txtState);
txtState.Text = "";
MPEWarning.Show();
return;
}
else
{
hdnStateTypedID.Value = CheckIfExists_State(txtState.Text);
}
stateID = hdnState.Value.ToString() != "" ? hdnState.Value : hdnStateTypedID.Value;
}
FillReport(clientID != "" ? clientID : null, stateID != "" ? stateID : null, txtZipCode.Text != "" ? txtZipCode.Text : null);
}
private void FillReport(string clientID, string stateID, string zipCode)
{
RVReferralListing.Visible = true;
RVReferralListing.BorderWidth = 2;
Uri ur = new Uri(Convert.ToString(ConfigurationManager.AppSettings["ReportServerUri"]));
RVReferralListing.ServerReport.ReportPath = Convert.ToString(ConfigurationManager.AppSettings["ReportPath"]) + "/PG_ReferralReport";
RVReferralListing.ServerReport.ReportServerUrl = ur;
List<ReportParameter> paramList = new List<ReportParameter>();
paramList.Add(new ReportParameter("ClientID", clientID, false));
paramList.Add(new ReportParameter("State", stateID, false));
paramList.Add(new ReportParameter("Zipcode", zipCode, false));
paramList.Add(new ReportParameter("ZipCode_1", zipCode, false));
paramList.Add(new ReportParameter("UserID", Convert.ToString(Session["UserID"]), false));
paramList.Add(new ReportParameter("AllowView", Convert.ToInt32(AllowView).ToString(), false));
paramList.Add(new ReportParameter("AllowEdit", Convert.ToInt32(AllowEdit).ToString(), false));
paramList.Add(new ReportParameter("EditDataAccessType", EditDataAccessType, false));
paramList.Add(new ReportParameter("ViewDataAccessType", ViewDataAccessType, false));
RVReferralListing.ServerReport.SetParameters(paramList);
//RVReferralListing.Reset();
hdnClient.Value = "";
hdnState.Value = "";
}
|
|
|
|
|
I got the solution for above issue
Issue is we have a folder name called Reports in application and also we have same name virtual directory in IIS
|
|
|
|
|
Hi,
DECLARE @Location_ID INT<br />
SELECT @Location_ID = 3<br />
<br />
;WITH ret AS(<br />
SELECT * FROM Locations<br />
WHERE Location_ID = @Location_ID <br />
UNION ALL<br />
SELECT t.*<br />
FROM Locations t INNER JOIN<br />
ret r ON t.Parent_ID = r.Location_ID<br />
)<br />
SELECT * FROM ret
here is my query, am getting error:Incorrect syntax near the keyword 'WITH'
help me to fix this problem friends
icanmakeiteasy
|
|
|
|
|
|
Michel Godfroid wrote: Semi-colons do not display in Braille?
There's nothing wrong with the semi-colon. What point were you trying to make, or were you just trying to be smart?
|
|
|
|
|
You're right, I stand corrected; sincere apologies.
The line breaks and absence of indentation made me think the first couple of lines belonged to the same statement.
|
|
|
|
|
There is nothing wrong with this query unless you are using SQL 2000 or earlier!
Wout Louwers
|
|
|
|
|
srry, for the late reply
am using sql server 2000,
plz help me to achieve this in sql server 2000
icanmakeiteasy
|
|
|
|
|
Is it possible to specify multiple text data filters in sql profiler 2005? IE: if you go to the trace properties and then column filters. I have a textData - not equal filter specified, but I'd like to add a couple other text values to ignore. Is this possible?
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
hi iam using sql server 2000
iam having two tables with same fields
my first tableA contains the fields
Orderid int primary key identity(automatically increment)
productname nvarchar
price nvarchar
quantity nvarchar
total nvarchar
my second tableB contains the fields
Orderid int (no primary key)
productname nvarchar
price nvarchar
quantity nvarchar
total nvarchar
from asp.net iam entering multiple values at a time in tableA, at the same time i want to insert into tableB
can you give the querry which helps me
|
|
|
|
|
A stored procedure that performs the operation should do it. Or you could put a trigger on TableA if you liked.
I'd question your datatypes for fields like price, quantity, total etc. Shouldn't be using strings for what looks like numeric information
CREATE PROCEDURE CreateOrderDetails
(
@ProductName NVARCHAR(50),
@Price NVARCHAR(10),
@Quantity NVARCHAR(10),
@Total NVARCHAR(10)
)
AS
SET NOCOUNT ON
DECLARE @MyRecordId INT
INSERT INTO
TableA (productname, price, quantity, total)
VALUES
(@ProductName, @Price, @Quantity, @Total)
--Get the ID of the record we just created
SET @MyRecordId = SCOPE_IDENTITY()
INSERT INTO
TableB (Orderid, productname, price, quantity, total)
SELECT
Orderid, productname, price, quantity, total
FROM
TableA
WHERE
Orderid = @MyRecordId
RETURN @@ERROR
SET NOCOUNT OFF
|
|
|
|
|
I'm curious, what is the logic for creating such a data structure, why are you storing data twice.
And yes you really should change you data types away from the default, it will cause you no end of problems.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hey by using trigger u can do this. Trigger can used to implemnt business rules
|
|
|
|
|
I wouldn't do this since triggers can slow down the DB. Stored procedure or sep. calls is better. If it needs to be all or nothing and assuming the inserts are single row, wrap in a transaction.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
You can make your stored procedure save same data in both the tables (two insert statements). BTW, why are you doing this? Don't you think it is weird?
|
|
|
|
|
Hi all,
This is how im getting columns from 3 tables....
select projectID=projects.projectid,projectname,
[image],country,county,ClientCompany,city,ConstructionCompletionDate_dt,
OverallBuildingSize_uts from projects, schedule,BuildingSiteStatics
where projects.projectid=schedule.projectid and projects.projectid=BuildingSiteStatics.projectid
I have searched from 2 tables using following query
select a.*,b.ConstructionCompletionDate_dt from projects a join
schedule b on a.projectid=b.projectid where projectname like '%%' or
country like '' or clientcompany like '%%' or
ConstructionCompletionDate_dt like '%%'
Now i need to search columns from 5 tables How can i do it....
|
|
|
|
|
test-09 wrote: Now i need to search columns from 5 tables How can i do it....
Obviously, you need to join the remaining tables with your existing ones and filter the data from the corresponding columns.
When you fail to plan, you are planning to fail.
|
|
|
|
|
As said, jion all 5 tables.
If you expect to reuse the 5 table join in other queries I would create a view, makes life much simpler.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
select projectID=projects.projectid,projectname,
[image],country,county,ClientCompany,city,ConstructionCompletionDate_dt,
OverallBuildingSize_uts from projects, schedule,BuildingSiteStatics
where projects.projectid=schedule.projectid and projects.projectid=BuildingSiteStatics.projectid
using above query how can i join 5 tables..
|
|
|
|
|
This query uses what I call Oracle joins where the links are in the where clause, never to be seen in any database I own. Use the propert join methods. Here is a sample from a view I have
FROM dbo.FactConsoTB AS F
INNER JOIN dbo.Branch AS B ON F.BranchID = B.BranchID
INNER JOIN dbo.lnkAccountProduct AS L ON F.APLinkID = L.APLinkID
INNER JOIN dbo.Account AS A ON L.AccountID = A.AccountID
INNER JOIN dbo.Product AS P ON L.ProductID = P.ProductID
INNER JOIN dbo.Currency AS C ON F.CurrencyID = C.CurrencyID
INNER JOIN dbo.Currency AS BC ON F.BaseCurrencyID = BC.CurrencyID
INNER JOIN dbo.ProductCategory ON P.ProductCategoryID = dbo.ProductCategory.ProductCategoryID
test-09 wrote: select projectID=projects.projectid
Why are you useing this.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
using view i tried this but im getting error
"Ambiguous column name 'ConstructionCompletionDate_dt'"
what wrong im doing....
SELECT dbo.Projects.ProjectID, dbo.Projects.ProjectName,
dbo.Projects.City, dbo.Projects.County, dbo.Projects.Country,
dbo.Projects.ClientCompany,
dbo.BuildingSiteStatics.OverallBuildingSize_uts,
dbo.Schedule.ConstructionCompletionDate_dt,
dbo.OverallDevelopment.TotalNumberDwellings
FROM dbo.Projects INNER JOIN
dbo.BuildingSiteStatics ON dbo.Projects.ProjectID = dbo.BuildingSiteStatics.ProjectID INNER JOIN
dbo.OverallDevelopment ON dbo.Projects.ProjectID
= dbo.OverallDevelopment.ProjectID INNER JOIN
dbo.Schedule ON dbo.Projects.ProjectID = dbo.Schedule.ProjectID where projectname like '%%' or country like ''
or clientcompany like '%%' or ConstructionCompletionDate_dt like '%%'
|
|
|
|
|
Prefix the column name with the tablename or the alias.
Also try Google and BOL, the response time is generally quicker and gentler.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
test-09 wrote: Now i need to search columns from 5 tables How can i do it....
One alternative would be to build some views, consisting of a tablename, columnname and a varchar representing the value. Create a union of those views to search all columns with a single select-statement and the LIKE operator.
What database are you using? If you're on Sql Express, have you considered using the Full Text Search[^] component?
I are Troll
|
|
|
|
|