DataSource Controls :: Can't Find Query's / By Right Clicking On Database Created A Query In Server Explorer?

May 17, 2010

By right clicking on my database i created a query in server explorer. But where are this query stored can't find them back. I should aspect that their is a folder query's like there is a folder tables but this isn't the case.

View 10 Replies

Similar Messages:

DataSource Controls :: Implementing A BLL / Contacts Table, The Select Method Is A Sql Query Against A Sql Server 2000 Database?

Feb 17, 2010

I'm implementing a BLL layer and have a few questions. First, in my DAL, there is a contacts table, the select method is a sql query against a sql server 2000 database. The preview data returns everyting as expected. The query is


The BLL method is built like so


When using the BLL method to a gridview, the results of the subquery are not displayed. There are also other methods, each having a different where clause for ContactRole_ID and each is having the same issue of not displaying the subquery reult in the gridview. No error, but no data is displayed for the subquery either. Here is the templatefield of the gridview


Another item that is causing an error is in trying to update a record. Here is the DAL update method


And the BLL update method


The error says i have extra parameters, but have no clue where the extra parameters are being picked up. The error isObjectDataSource 'odsContacts' could not find a non-generic method 'UpdateContact' that has parameters: _ContactID, _Active, _ContactName, _Office, _VirtualOffice, _Pager, _Fax, _Home, _Cellular, _Email, _ContactRole_ID, Active, ContactRole_ID, ContactName, Office, Email, VirtualOffice, Pager, FAX, Home, Cellular.And the objectdatasource


View 4 Replies

DataSource Controls :: SqlDataSource And Parameters Query / Trying To Accomplish Is Building Dynamic Query

Aug 22, 2010

1. I have a GridView on my page and it uses sqldatasource with parameterized query. What I want to do is, on page load (where nothing has been selected so no parameter supplied), I want it to query everything (something like SELECT * FROM [this_table]) but since my SelectCommand is something like

SELECT * FROM [this_table] WHERE [this_column] = @someParameters AND [that_column] = @someParameters.

Can I play around with default value to achieve something like that but how ? Now, when the page loads, it doesn't show anything (No Gridview).

2. On my page, I made something like (username, gender, address, and more) and one single search button. That means, no single control enable auto postback. What I am trying to accomplish is building dynamic query

(if username specifed -> SELECT * FROM [this_table] WHERE [username] LIKE @username).

If both username and gender are specified (SELECT * FROM [this_table] WHERE [username] LIKE @username AND [gender] = @gender) and you know the rest. How can I do this using GridView and SqlDataSource ? To my knowledge, I can only specify one SELECT statement in a sqldatasource.

View 11 Replies

DataSource Controls :: Update Query Not Working When Using Query Builder To Configure Table Adapter

Jan 15, 2010


This query works perfectly on the query analyser.

But when configuring the Table adapter ,I try executing the query and i get 0 rows affected.

What could I be getting wrong in this case.

NB:Existing GalleryID has been supplied.

View 1 Replies

DataSource Controls :: How To Convert Sql Query Into Linq Query

Mar 10, 2010

select Groupid,GroupName,onorusername from palgroup where groupid in (select distinct Groupid

View 5 Replies

DataSource Controls :: Accessing FK From A Query Via Entity Query

Jan 21, 2010

I've got a query such as

Dim MediaQuery =
From m
In dB.DOWNLOADS _Where m.ID = id _Select

which returns a record from the database. One of the fields in the record is a FK to another table. I need to read this value to be able to set a dropdown based on the ID but I can't work out how to access it. For a standard record I can just do the following txtTitle.Text = MediaQuery.FirstOrDefault().TITLE

However with the foreign key it doesn't work like that. I've tried drpGroup.SelectedIndex = MediaQuery.FirstOrDefault().DOWNLOAD_GROUPS.ID where DOWNLOAD_GROUPS is the FK field but it returns Object reference not set to an instance of an object. If you're simply wanting to read some values from a single db record in the entitiy framework and one is a foreign key how should I go about getting the value?

View 2 Replies

DataSource Controls :: How To Connect Server Explorer To A Remote SQL Server Database

Mar 13, 2010

I have created web pages using VS Web Developer that use a local Developer Edition of SQL server database on my PC with LINQ to SQL. When I deploy my website to a remote web host SQL server, I need for my web pages to be able to use the remote database instead of the local database. So, how do I get the Server Explorer to connect with a remote SQL Server database?

View 6 Replies

DataSource Controls :: How To Cast Concrete Type Created In LINQ Query To The Corresponding Interface Type

May 3, 2010

I have an Interface that has its concrete class defined via a factory. Because of this I found no way to use the Interface tpye directly in my LINQ quesry so I had to use the concrete class types to creat a generic list. The LINQ query works but after calling.ToList() on the LINQ query result I get a List(of MyConcreteClass), but I need a List(of IMyConcreteClass). I have tried everything I can find: .Cast, Ctype, implicit casting, etc. but I always get back one of the (2) messages (depending on if I attempt to cast)message:

"Unable to cast object of type 'System.Collections.Generic.List`1[MyConcreteClass]' to type 'System.Collections.Generic.IEnumerable`1[IMyConcreteClass]'."
"Unable to cast object of type '<CastIterator>d__aa`1[IMyConcreteClass]' to type 'System.Collections.Generic.List`1[MyConcreteClass]'."

Here is the sample code:


View 2 Replies

DataSource Controls :: Query The Entire Database For A Name

Jan 25, 2010

I need to query a database but dont know how to do what I need to do. I Have a large database with many colums and rows. I need to query the entire database for a name. Then if found I need to know which column the name is in. How can I do this?

View 7 Replies

Use Query Created In Sql Server For Crystal Report?

Nov 10, 2010

using 2005.I have a console application that is displaying a Crystal Report.I want to use a query that I created in sql server mgmt for the data in Crystal reports.some questions:

1. how do I do this?

2. Is is more efficient to do this with stored proc or just enter the query?

3. There are some fields where I need a case statement because so that I can display meaningful text (not the code values that are returned), is it normally more efficient to put the case statement in the SQL or to add logic in the report for this?

View 1 Replies

DataSource Controls :: Select Query / Not Filtering Data From Database?

Mar 19, 2010

i have used one query like this

Select skillReq from tblPostJobs where SkillReq like '%Silverlight 2.0%'

it is working fine. But while giving

Select skillReq from tblPostJobs where SkillReq like '%Silverlight 2.0,C#%'

It is not filtering data from database. It is only checking starting and ending Character.In my database some keyskill are like that 3.5,4.0,C#,Sql server 2008,Silverlight 2.0,3.0.

My requirement is to check each word in "SkillReq" text.

View 3 Replies

DataSource Controls :: How To Convert, The Code To Query A SQL Database Using A DSN-less Connection

Sep 10, 2010

How do we convert, the following code to query a SQL database with ASP using a DSN-less connection


View 2 Replies

DataSource Controls :: SqlDataSource Query Not Using Index On Database Table?

Jan 20, 2011

I have this sqldatasource:

<asp:sqldatasource id="SqlDataSourceX" runat="server" connectionstring="<%$ ConnectionStrings:MyConn%>" providername="System.Data.SqlClient"
selectcommand="SELECT ItemNum, MIN(DateAdded) as [DateAdded]
WHERE [DateAdded] between @DateFrom AND @DateTo


When I call select in codebehind, after 30sec it throws timeout expired SqlException:


again , this select took up to 3 sec to be executed. In application I tried to use SqlConnection and SqlTableAdapter instead of SqlDataSource, with the same query, and again it took up to 3 sec.

If I choose tighter interval (e.g '2011-01-20 00:00:00' - '2011-01-21 00:00:00') , there is no timeout exception, so I know that sqldatasource select is executed correctly. So the conclusion is that sql server is not using index while executing query sent from sqldatasource, but is using index whenever else. I have also checked the index statistics on sql server and it is like that. In profiler i can see slight difference between this two cases. As for SqlDataSource, in events table, in first column "EventClass" after 30 sec, there is this: "RPC:Completed" and application throws timeout. If i use SqlConnection and SqlTableAdapter then at the same place there is this: "SQL:BatchStarting" and "SQL:BatchCompleted" and application does not throws timeout(the index has been used).

what is so special on SqlDataSource connection, that Sql Server performs differently compared to other types of connections?

View 3 Replies

DataSource Controls :: Update Query To Edit Records And Save To Database?

Feb 22, 2010

I am doing update query to edit my records and save to my database...I am getting the query expression exception...syntax error (missing operator) in query expression 'WebLogin=krish'.

string strUserName = Request.QueryString["UserName"].ToString();
DateTime dateTimeNow = DateTime.Now;
string ConnString = ConfigurationManager.ConnectionStrings["Data"].ConnectionString;[code]....
I am getting the exception syntax error (missing operator) in query expression 'WebLogin=krish'.

View 3 Replies

DataSource Controls :: SQL Server Update Query?

Apr 5, 2010

How to update two tables in a single update query.

View 6 Replies

DataSource Controls :: Query To Execute The Job In Sql Server?

Apr 12, 2010

Is there any possibility to execute the job in sql server. I want to create the Job. then through the quer i want to execute this Job by passing parameters. can we able to do this.Actucally i want to execute the SP from front end. but suddenly it should respond to the page. but that SP will run for nearly 5 minutes.

View 1 Replies

DataSource Controls :: Cross Tab Query In Sql Server?

Jun 4, 2010

I have never tried Cross Tab query in sql server. Googled but could not find possible solution.

I have following tables & need to create cross tab on them.



View 4 Replies

DataSource Controls :: SQL Query Optimation For SQL Server 2000?

Jun 28, 2010

SQL query optimation for SQL Server 2000?


View 3 Replies

DataSource Controls :: Update Query With Sql Server 2005?

May 2, 2010

I have select query like this :


View 2 Replies

SQL Server :: How To Find And Replace Substring In Select Query

Sep 22, 2010

how to find and replace substring in select query


View 2 Replies

Forms Data Controls :: Clicking Edit Changes GridView Back To Original Query?

May 28, 2010

I have a gridview that I have bound to a sqldatasource. However I have the gridview changing data shown per a drop down list and textbox so I can choose how I am searching.

My code includes changing the select command of the data source and rebinding the gridview.

My issue is that if I implement the edit button and click edit the grid view seems to resort back to the original select command that was entered when I created the datasource.

Is there any way to get the gridview to do what I want it to?

View 11 Replies

SQL Server :: Cannot Find Execute Any Query, Stored Procedure Not Found Even If It Is There?

Nov 3, 2010

I am getting frustrated with this problem, I dont know what i did, but now I cannot execute any stored procedured when I could last time.When I use my application to run the query, it finds the stored procedure but when I execute it is sql management studio it says it cannot find the stored procedure even though it is there.I tried to execute other procedures and the samething happens. Even when I try a simple query it says it cannot find the tableI could execute the query if i placed Use [databasename] in front, but even with this, I cannot execute stored procedures.

View 12 Replies

SQL Server :: Query To Find The 5th Highest Salary From An Employee Table?

Oct 15, 2010

query to find the 5th highest salary from an employee table?

View 2 Replies

DataSource Controls :: Query Request For A SQL Server Based Interview Question?

Feb 26, 2010

This was asked during one of my interview.I was not able to answer could someone help me out to write a query for this With the above table.We should have a qry written so that it shows the following result

View 2 Replies

DataSource Controls :: How To Write Query Using Pivot Logic In Sql Server 2005

Jan 7, 2010

i have a table for customer forecast which contains customer, week number and quantit as columns. now i need to write query and list the week as column for each customer and each cell should have a quantity. how to write query for this using pivot logic. i dont want to use cursor.

View 3 Replies

Copyrights 2005-15, All rights reserved