Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.
http://forums.asp.net/p/981020/1750831.aspx#1750831
Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.
http://forums.asp.net/p/981020/1750831.aspx#1750831
please help me
i need for example
when my user clicke in the button a new table build in my sql database
please help me
Try the links below for more info on create table statement for SQL Server 2000/2005. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_create2_8g9x.asp
http://msdn2.microsoft.com/en-us/library/ms174979.aspx
sqlI have 5 tables in sql database, naming Book, Category, Subject, UserDownload, User.
In Book table, BookID, BookTitle, CategoryID
In Category table, CategoryID, CategoryName
In Subject table, SubjectID, SubjectName, CategoryID
In UserDownload table, UserID, BookID
In User table, UserID, UserName
I used Book to store information of books. Those books has many categories. In those categories, there is also some subjects.
When user downloads book, I update UserDownload table.
The result I want to get is, Top Ten Download Subject. How can I get? Please help me.
The way I approach this kind of query is to first list the columns I need to return. Then I start thinking about which tables I need to touch to get that data, and then I think about how the data is related. Something like this should work for you:
SELECT
Subject.SubjectID,
Subject.SubjectName,
TopDownloads.BookCount
FROM
Subject
INNER JOIN
Book ON Subject.CategoryID = Book.CategoryID
INNER JOIN
(SELECT TOP 10 BookID, COUNT(*) AS BookCount FROM UserDownload GROUP BY BookID ORDER BY COUNT(*) DESC) AS TopDownloads ON Book.BookID = TopDownloads.BookID
Why is the PasswordRecovery control creating another sqlservr process after I successfully enter the user name, and for a reason I have not found yet it keeps the database in a read only modem then when I answer my security question correctly it gives me the error:
Failed to update database "C:\INETPUB\WWWROOT\VER1.0.0.1\APP_DATA\ASPNETDB.MDF" because the database is read-only.
I read other post regarding the read only message and I don't if there doing the same thing, but why does this happen and what is the solution to this other not using the control?
cancel that!... found solution from another post...Use Raiserror with severy >=16:
create procedure InsertEmployee
@.id int
as
if @.id = 0
begin
RAISERROR ('Employee ID can''t be 0',16,1);
end
else
begin
--INSERT here
print 'ID > 0 '
end
|||But the important section is how to catch this error message from windows application and show it when the user try to enter value for id employee less than 1|||That depends on the technology that you are using to connect to the database server and also the programming language that you have used to develop the client application. You're unlikely to get the answer to your question in a T-SQL forum.
See if you can find a more relevant forum in this list:
http://forums.microsoft.com/MSDN/default.aspx?siteid=1
Just to steer you in the right direction, and now that you've been advised on how to raise errors in your stored procedures, then this forum might be the next port of call:
http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=45&SiteID=1
Chris
|||If you want to use SqlCommand explicitly:SqlCommand cmd = new SqlCommand("<name of your SP>",conn);
cmd.Parameters.Add("@.ID",SqlDBType.Int);
cmd.Parameters["@.ID"].Value = <value from user input>;
try
{
cmd.ExecuteNoQuery();
}
catch(SqlException e)
{
//Catch error here
//For example
MessageBox.Show(e.Errors[0].Message);
}
If you want to use SqlDataAdapter/TableAdapter
SqlDataAdapter da = <some code to obtain>;
try
{
da.Update(ds);//ds - you dataset or datatable
}
catch(SqlException e)
{
//Catch error here
//For example
MessageBox.Show(e.Errors[0].Message);
}|||The whole point is that if your are giving id as parameter why not check the value inside your application before sending it to the SP.
Now other option is to write a trigger inside which u rollback ur transaction if id is 0. This will prevent 0's not only from appl but also from backend
Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?
Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.
I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.
Is this possible? The local cube file is created off the server database using MDX (create global cube).
Thanks,
Lyn
Is this possible? The local cube file is created off the server database using MDX (create global cube).
yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?
Karim
Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?
Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.
I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.
Is this possible? The local cube file is created off the server database using MDX (create global cube).
Thanks,
Lyn
Is this possible? The local cube file is created off the server database using MDX (create global cube).
yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?
Karim
Is it possible to have multiple pivot tables in the same Excel workbook accessing the same offline cube file?
Currently, when the user is connected to the server it connects to a .asdatabase to populate many pivot tables. I need to allow the user to access a local cube file when they are not connected to the server.
I am using excel vba macros to connect the pivot caches to the online data source, which works perfectly. I would like to do the same to connect the pivot caches to the local cube file.
Is this possible? The local cube file is created off the server database using MDX (create global cube).
Thanks,
Lyn
Is this possible? The local cube file is created off the server database using MDX (create global cube).
yes possible , but there is a problem. u have to run this MDX statment manually , I tries to put it in a schedule in a jobs list , but it says the MDX syntax is worng, any help?
Karim
A user pointed out an odd bug / inconsistency that occurs when using Excel pivot tables. Depending on how attributes are related to each other, Excel does some odd things when cross joining attributes from the same dimension on an axis.
Example 1. "Correct" cross join of attributes:
Connect to AdventureWorks from Excel pivot table. Drop in "Internet Sales Amount".
On rows add "State-Province" and "Total Children". Row 4 should read "State-Province, Total Children, Total".
Click the drop-down on "Total Children" and select "1".
The results should be filtered so that you only see states where there are internet sales for families with 1 child.
Example 2. "Incorrect" cross join of attributes:
Connect to AdventureWorks from Excel pivot table. Drop in "Internet Sales Amount".
On rows add "State-Province" and "Country". Row 4 should read "State-Province, Country, Total".
Click the drop-down on "Country" and select "United States".
The results *should* be filtered so that you only see states belonging to the United States. Instead, we still see states belonging to other countries.
Shouldn't the "United States" selection on the rows preclude the states from other countries? I don't understand why the pairs of attributes in examples 1 and 2 interact so differently. I would appreciate any meaningful explanation than I can pass on to the user.
Are you using Excel 2003 or Excel 2007? Not sure if I recreated the examples exactly or not, but in Excel 2007, it seems to behave as you expect it to. In the first example, I get the states filtered to just those that had customers with a total children value of 1. And in the second example, I get the states filtered to just those in the United States.
Unless I'm doing something wrong, this seems to work in Excel 2007. I don't have Excel 2003 loaded on my current machine, but could get to another machine to test this if you are indeed using Excel 2003...
Another question would be what service pack level you have installed for Analysis Services. I have SP2 installed (which I don't think would change the behaviour of Excel, but...) So, if you are using Excel 2007, what service package are you running for SSAS?
Dave Fackler
|||I started with Excel 2003. I saw the bizarre behavior. Then I saved the document and opened in Excel 2007. And still saw the bizarre behavior.
In 2007 I have to enable "classic layout" to get both "State-Province" and "Country" to both show up side-by-side (stacked) on rows. Then I just uncheck all countries and check only "United States". However the states and provinces of other countries are still displayed in the first column.
I'm on SP2 of SSAS. Thanks in advance.
|||
Is it possible that you have the Country attribute from the Geography dimension selected with the State-Province attribute from the Customer dimension (or vice versa)? Both dimensions contain geography attributes. While they are named the same, they represent attributes in different dimensions. Thus, they are related only through the fact table. That means that filtering of one will not filter values from the other (although the filtering does affect the fact data as expected).
Dave Fackler
|||The problem happens when the "State-Province" is added in rows with the "Country" of the *same* (Customer) dimension. We actually noticed the problem first in our production cubes and then reproduced it in AdventureWorks.
To be clear, add "State-Province" in rows so it shows in the *first* column, add "Country" in the *second* column, and then try to filter the country by the "United States". Unfortunately this doesn't preclude states from other countries.
This is such an obviously inconsistency but it only occurs when attributes are related to each other in the way that "State-Province" and "Country" are. I'm surprised that I haven't heard of other complaints. Also unusual is the fact that my own MDX expressions with these two attributes never return the same data that Excel is displaying.
Anybody else see this problem?