Using A Profile Object In A Query

Apr 24, 2006

I have created a profile object which is a list to store photoId into an array. (kinda like a shopping cart) which will persist in the list untill manually deleted by the user.

I want to use the photo Ids stored in this object in my profile as a parameter for an sql select statement to be displayed into a data grid.

What is the best way to go about this... and suggestions... I know you can use a profile property as a parametere in a sqldatasource but Im not sure how to do this for an array.


HELP

View 1 Replies


ADVERTISEMENT

SQL 2012 :: Find Profile Name In Stored Mail Profile That Already Exists

Jan 22, 2015

We have a previous SQL 2012 cluster that emails us when a new database is added. I am unable to figure out why we get this error any time we add a new database to it, and also it prevents us from adding a new availability group to this cluster because of this error.

I also am unable to figure out what profile it is talking about as this was setup before me and I am not a DBA.

View 9 Replies View Related

Filter Query On Profile Property

Nov 1, 2006

Hello All, Can someone please help me with this problem.  I have created additional profile properties for my users in the aspnet_profile table.  One of the properties is named 'Division'.  The division property is how I segregate users, for example, my company has multiple divisions and, the information that is displayed is dynamic according to which divison the user belongs to. Amost all of my stored proceedures are filtered by checking the value of Profile.Division of the logged in user. This system works great.  The problem is, now I am working on user management and I need to create a Gridview that will display all of the users for a particular division but, I have no idea how to filter a query against the aspnet database to get the results I am looking for.  Here is a small example:SELECT     aspnet_Users.UserName, aspnet_Profile.PropertyNames, aspnet_Profile.PropertyValuesStringFROM         aspnet_Profile INNER JOIN                      aspnet_Users ON aspnet_Profile.UserId = aspnet_Users.UserId********   Here is the part I need help with *********************WHERE  PROFILE.DIVISION = KOr, can it even be done? Can you filter a query on the value of a profile property?Anyone have any ideas?Thanks in adavance for your help

View 2 Replies View Related

Predict Query Gives 'DMPluginWrapper; Object Reference Not Set To An Instance Of An Object' Error

Mar 17, 2008



Hi,

I am trying to develop a custom algorithm. I have implemented and tested training methods, however I fail at prediction phase. When I try to run a prediction query against a model created with my algorithm I get:


Executing the query ...
Obtained object of type: Microsoft.AnalysisServices.AdomdClient.AdomdDataReader
COM error: COM error: DMPluginWrapper; Object reference not set to an instance of an object..
Execution complete


I know this is not very descriptive, but I have seen that algorith doesn't even executes my Predict(..) function (I can test this by logging to a text file)
So the problem is this, when I run prediction query DMPluginWrapper gives exception -I think- even before calling my custom method.

As I said it is not a very descriptive message but I hope I have hit a general issue.

Thanks...

View 3 Replies View Related

Cannot Run Query--referenced Object

Apr 9, 1999

Msg 225, Level 16, State 1
Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization.

can anyone tell me how to solve this problem
thanks

Ali

View 2 Replies View Related

SQL Object/table - Query !

Oct 2, 1998

Hello out there,

I am very new to SQL.

A user in my group created a batch of tables - now belonging to his id.
I have permissions to use all those tables - however I must type the owner/table to use those objects.
Is there any method of only typing in the table/object name instead of owner/table?

Thank you - in advance for your response <:)

View 1 Replies View Related

Invalid Object Name In Query

Nov 21, 2006

I am brand new to SQL , and have been asked to come up with a solution for the following error when running a query - Invalid Object Name 'Despatches'

Is it as straightforward as it looks, it because the query is being run on an object that does not exist.

View 1 Replies View Related

Query Error: Invalid Object Name

Sep 26, 2005

I'm getting the following error when I try to add a new record to the db:System.Data.SqlClient.SqlException: Invalid object name 'Pub_Points'. My table is called Pub_Points. I've had an insert working before.This is the SQL string that I'm trying to send:INSERT INTO Pub_Points ('PPName','Encoder_URL','Connect_Type','Archive','Creation_Date') VALUES ('fu','barr','local ','19/26/2005 13:35:27')Yet updating an existing record during the same run works fine:UPDATE Pub_Points SET PPName='foo ', Encoder_URL='bar', Connect_Type='remote ', Archive='0' Where ID='114' So it can't be a problem finding the table itself.Only two things I can see that are different:- the Insert procedure first creates and attaches the formatted date string (which you see already inserted in the Insert query)- the database has an auto-generating key field 'ID' (which you see being referenced in the UPDATE query)but I don't see how either of those things would give me this error.Ideas?

View 1 Replies View Related

Query Insert And Predicate On The Same Object

May 9, 2006

Hey all,

I've a querie which inserts into a table, while joining on it. Something like:

insert into table1
(columnA,
columnB
)
select (columnA,columnB)
from table2
where columnA NOT EXIST(SELECT 1 from table1,table2 where table1.columnA!=table2.columnA)

As a rule of thumb, I avoid subselects and negative logic. However, sql2k seems to pick the fastest execution plan using this query, using a left anti semi join on that subselect. My question is this; what are the repercussions of inserting into a table when sql2k has already picked a query plan based on its stats? Is deadlocking possible? I haven't been able to find any evidence one way or the other. My objects are several million rows, so I am expecting some sort of side effect.

Any help would be greatly appreciated.

Regards,
-Kilka

View 2 Replies View Related

Query Builder - Invalid Object Name

Jun 6, 2008

Hi, I am trying to generate a report and I am using the query builder feature in SQL Server Reporting Services.

I just entered a simple query (actually the query builder generated it for me):

SELECT ID, pname
FROM jira393.project

and it seems to run fine but when I click "OK" to go to the next step, I keep getting an invalid object name error: 'jira393.project'

I don't know what is wrong right now since when I run it, it seems to display the correct information but trying to go to the next step displays that invalid object error.

Does anyone have any idea what is wrong?

View 1 Replies View Related

Return Jason Object From Query?

Jan 12, 2015

Is it a way to return Jason object from SQL query?

This is my store proc that I like to return Jason object.

Create PROCEDURE [dbo].[Get_Payment_Gateway]
AS
BEGIN
SET NOCOUNT ON;
SELECT [Payment_Gateway_ID]
,[Payment_Gateway_Name]
,[Payment_Gateway_URL]
,[Payment_Gateway_Description]
FROM [CustomerPortal].[dbo].[Payment_Gateway] PG WITH (NOLOCK)
END

View 2 Replies View Related

Update Query Gives Invalid Object

Jul 21, 2007

I'm new to SQL from Access and trying to run an update in the Query Analyzer. I created the following Select query in the Enterprise Manager and it works fine:

SELECT CVTotalswSalesperson.[Item Number] AS Item, CVTotalswSalesperson.[Sales ID] AS SalesID
FROM dbo.Inventory INNER JOIN
CVTotalswSalesperson ON dbo.Inventory.ItemNumber = CVTotalswSalesperson.[Item Number]
WHERE (dbo.Inventory.PlantID = 4)



I then tried to replace the Select with an Update in the Query Analyzer ...

UPDATE dbo.Inventory

Set SalesPersonID = CVTotalswSalesperson.[Sales ID]

FROM dbo.Inventory INNER JOIN
CVTotalswSalesperson ON dbo.Inventory.ItemNumber = CVTotalswSalesperson.[Item Number]
WHERE (dbo.Inventory.PlantID = 4)



and I get "Invalid object name 'CVTotalswSalesperson'."



What am I doing wrong? Thanks.

View 3 Replies View Related

Lookup Object With Where Clause In Query

Feb 25, 2008



Hi,

I have a Dimension Dim_Customer with these fields:

CustomerKey (mandatory)
CustomerAccount
CompanyKey (mandatory)

I used the lookup object to compare if the data from the working table (Dim_WCustomer) is existing in the Dim_Customer.

The reference column is Customer Account. However, the records with CustomerKey 1 to 5, which have special function when linked to fact table, have no customer account (NULL) that's why i want to filter that out from the lookup.

This is the select statement in my lookup: Select CustomerKey, CustomerAccount where CustomerKey > 5. When I previewed this, i don't see the 1-5 customerkey. However, when I ran the data flow, it gives me this error:

OnError,,,Add new records to Dim_Customer,,,25/02/2008 6:43:52 PM,25/02/2008 6:43:52 PM,-1071636471,0x,SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E2F.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E2F Description: "Violation of PRIMARY KEY constraint 'PK_Dim_Customer'. Cannot insert duplicate key in object 'dbo.Dim_Customer'.".


When I removed the 1-5 customers in the database, it worked well. It seems "where" clause in lookup doesn't function well....

anyone who can help?

che

View 4 Replies View Related

Sql Profile

Apr 3, 2000

Hi,
This is Raj..could anyone pls explain the sql profile and how we will set the row-level locks as a dba.Sorry it is a silly question but sometimes these questions are bugging my mind.
Thnak u in advance.

--Raj

View 1 Replies View Related

A Query To Determine A Role Or Id's Access To An Object... Do-able?

Oct 19, 2007

Hey there.
I must write a stored procedure to update a table and want to make sure the ID used in both Acceptance and Production will have the necessary access.  The ID will inherit it's access to the resource though a ROLE.
Wondering if there are queries out there that can traverse for example, the roles/id's that have access to it... Thx!

View 2 Replies View Related

Query Analyser Does Not Check For Object Existence

Nov 27, 2000

we tried out the following code in query analyser -

create procedure TrialProc

as

select * from sakjdhf


when we executed this piece of TSQL in query analyser, we expected it to give an error or warning that no object by the name of sakjdhf exists ( as actually there is no such table or view in the database ). however to our surprise we got "command completed successfully " !!

does this mean the SQL server does not check for necessary objects when creating a stored procedure ? or is there some setting that we missed out whihch is causing SQL server to overlook the error in the code ?

View 3 Replies View Related

SQL Query Analyzer Invalid Object Name Error

Jun 11, 2007

We have several databases but one is behaving differently in SQL Query Analyzer. Please assume we have selected the correct db in the the pull-down and assume database name is DB1 and table name is Table1

SELECT *
FROM db1.[table1]
works fine.

SELECT *
FROM [table1]
returns "Invalid Object Name Error".

This problem causes some complex queries not to work so I'd like to know if this db has some special setting that requires explicit db name in each query.

We have also tried..
use [db1]
SELECT *
FROM [table1]

It still gives the same error.
Any help would be appreciated.
Thansk

Notalian

View 3 Replies View Related

SELECT - Profile

Feb 17, 2007

I use the default database called "ASPNETDB.mdf" that is automatically created in Visual Studio Express 2005....
There is an table called "aspnet_Profile" that holds the profile-properties, UserID etc.
There is also another table called "aspnet_Users" that holds all usernames, UserID etc...
No to my problem:
I have a SqlDataSource-control and want to select all users that have the property profile.Color = "Blue"....
How can I write the SQL-part for that?  

View 2 Replies View Related

Profile GUID

Apr 13, 2007

I am using a SqlDatasource and need to set a SelectParamter to the ProviderUserKey (The GUID of the user when Profiles are enabled)
 Can anyone tell me whether it is possible and How?
I am currently using the session state to store it in and then using the session=... to get the value into the parameter.
Is there a direct way of passing this value into a SelectParameter when using a SqlDataSource?
Thanks in advance.

View 3 Replies View Related

SQL Mail Profile

May 27, 2001

Hi,
Is it necesarry that to run SQL Mail, you need MS Exchange Server as the mail server? Our mail server is MDaemon 2.8. Can anyone tell me what would be the mail profile for MDaemon?
TIA
Wilson

View 1 Replies View Related

MS SQL Profile Issue

Sep 16, 2003

I am using MS SQL 2000 profile function to monitor the a report process. (VB + Crystal+MS SQL)

I notice there are some actions named
as "object created "
what does it mean ?

View 3 Replies View Related

ASP.NET Profile Parameter In T-SQL

Feb 3, 2008

Hi

Is there any way that I can use an ASP.NET profile variable in a T-SQL parameter?
I need to base a query on the current ASP.NET profile variable for purposes of creating a report.
Thanks
Deon

View 3 Replies View Related

SQL 2012 :: Not Exists Linked Server Object Query

Aug 10, 2015

So, I've got this query running and it works great providing there is a record in both DataBases. Now, I need to get all of those that have a record in DBServer1 but not in TranscendDB. I assume i'd use an If not exists, but can't figure out the syntax when using the Linked Object...

select Portfolio
from [TranscendDB].[dbo].[CMContactEvents] as CM
inner join
(
select N.SSN, A.ACCOUNTNUMBER
from [DBServer1].[DB1].[dbo].[Account] AS A,

[Code] ......

View 4 Replies View Related

Query Analyzer Template Files, Object Browser Bug

Jul 23, 2005

I just found an odd bug and was wondering if anyone else has seen this.Any templpate file in the directory 'C:Program FilesMicrosoft SQLServer80ToolsTemplatesSQL Query Analyzer' that has the NTFScompression turned on (that is, colored blue in Windows Explorer) doesnot display in the object browser's template tab of query analyzer.Control-Shift-Insert works fine to insert a template, however.What's up with that?

View 2 Replies View Related

Profile, SQLDataSource And GridView

May 11, 2007

Hello.When I create a user at the ASP.NET database, I need to insert more fields than the defaults, and I do it like this:         Dim customProfile As ProfileCommon = ProfileCommon.Create(CreateUserWizard1.UserName, True)              
customProfile.telephone =
(CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("TelephoneText"),
TextBox)).Text(telephone example)Those data are inserted at the DB at the aspnet_Profile table, in the fields PropertyNames & PropertyValuesString, but they are saved together (see image above)

I want to separate those properties in the GridView as long as each property appears in a column, is it possible? Thank you very much, i'm expecting your answers.

View 11 Replies View Related

Does The Profile Provider Uses Cache?

Feb 3, 2008

Hi,
I use the Table Profile Provider: http://www.asp.net/downloads/sandbox/table-profile-provider-samples/ 
When I call for example: Profile.FirstName does this access the DB every time this call appears in my code?
Or all the profile is loaded to the cache when the user first loggs on?
thanks

View 4 Replies View Related

Change Profile Field Name

May 28, 2008

 I had a profile element named "Country", however, I want it to be named "CountryId". I can change this in the web.config with no problems, but then I need to update the code manually any place Profile.Country is referenced. Also, it seems I would have to write some SQL to update all the values in the profile table from Country to CountryId. Is there an easier way to do this? I'm using Visual Studio 2005 and SQL Server Express 2005.Thanks,Wes 

View 5 Replies View Related

Profile / Stored Procedure

Feb 25, 2004

Hi,

I have created a Stored Procedure, under Stored procedures section under Enterprise Manager on SQL server 2000.

Could anybody tell me, how and what are the steps to follow to TRACE the procedure , using SQL PROFILER ?

Please advice me !

Nicol

View 5 Replies View Related

Profile Value + Sql Value, A Login Problem

Apr 11, 2006

Hi all.  Quick question.  I'm using VS2005, C#, aspx page.I'm creating a Profile to store login and password.  That part is working...  I can call the values (and display them) using this code  <%= Profile.login %> and <%=Profile.password %>Now I want to create a Grid View that will connect to the SQL db, see if the login and password value stored in the Profile match that of ones in the SQL db.  So if the profile is login: bob password: dog, the grid view will output all application ID numbers associated with the bob and dog.  Here is the SQL code...trying to use the <%=Profile.login %> as a filter on the login and password doesn't seem to work...Can anyone tell me what I'm doing wrong?  How can I reference a value in the Profile within an SQL statement?SELECT     ApplicationStatus.Description, Customer.CustomerName, Application.ApplicationDateFROM         Application INNER JOIN                      ApplicationStatus ON Application.ApplicationStatusID = ApplicationStatus.ApplicationStatusID INNER JOIN                      Customer ON Application.ApplicationID = Customer.ApplicationID INNER JOIN                      [User] ON Application.DealerId = [User].UserIdWHERE     ([User].LoginId = '<%= Profile.login %>') AND ([User].LoginPwd = '<%= Profile.password %>') AND (ApplicationStatus.Description = 'Pending')

View 2 Replies View Related

SQLMail, MAPI Profile

Aug 7, 2000

I created a new MAPI profile on the server, and it seems to work fine with Outlook. I also dropped the previous default MAPI profile.

Now, when I go to the EM SQLAgent Properties, the only MAP profile offered in the SQLMail drop-down is the old, deleted profile. Also, only the old profile comes up with xp_get_MAPI_profiles.

How can I get SQLAgent to recognize that I've set up a new mail profile?

View 1 Replies View Related

Create Profile Sql2000

May 2, 2008

how to create profile use mail in sql2000

View 1 Replies View Related

Set Statistics Profile On Into Table

Jul 23, 2014

How can I insert the results of "set statistics profile on" into a table?

View 2 Replies View Related

DB Engine :: What Is UpdateLoginStats In Profile

Oct 7, 2015

We have a delay between the login and the first statment after the login. I see in the profiler trace that this delay is due to an eventClass "SQLTransaction" and the only information I have about it is that the objectName is "UpdateLoginStats". It is very interesting but this event usually takes 0 time, but when run from one specific user, it takes 10-1000 MS.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved