.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Search in two linked tables

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :ASP.Net
I've 2 tablesCorsi with a list of courses and AttivitaCorsi where I've a list of activities linked to each courseCREATE TABLE [dbo].[AttivitaCorsi]( [ID] [int] IDENTITY(1,1) NOT NULL, [IDAttivita] [int] NULL, [IDCorso] [int] NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_AttivitaCorsi] PRIMARY KEY CLUSTERED ( [ID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]CREATE TABLE [dbo].[Corsi]( [ID] [int] IDENTITY(1,1) NOT NULL, [IDTipologia] [varchar](1) NULL, [IDFornitore] [int] NULL, [Descrizione] [varchar](200) NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_Corsi] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] CREATE TABLE [dbo].[Attivita]( [ID] [int] IDENTITY(1,1) NOT NULL, [DescrizioneAttivita] [varchar](200) NULL, [ConcurrencyId] [timestamp] NULL, CONSTRAINT [PK_Attivita] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] Attivita table is used for know the description of each attivita in AttivitaCorsi (using IDAttivita)Now I've a SP where I can

View Complete Post

More Related Resource Links

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Need help to search for extra space in all tables.

Hi, I try to search for data which has some extra spaces in ALL TABLES. Does any one know if there a tool that can do that or the scripts can return all the data (see desire results below). Thank you in advance.  SQL2008. IF OBJECT_ID('Tempdb.dbo.#T1', 'u') IS NOT NULL   DROP TABLE #T1 GO CREATE TABLE #T1 (   FullName   VARCHAR(30) ) GO INSERT INTO #T1 VALUES ('Joe  Smith') INSERT INTO #T1 VALUES ('April Smith ') INSERT INTO #T1 VALUES ('Peter Chen') INSERT INTO #T1 VALUES ('Kristine Nguyen') GO IF OBJECT_ID('Tempdb.dbo.#T2', 'u') IS NOT NULL   DROP TABLE #T2 GO CREATE TABLE #T2 (   FullName   VARCHAR(30) ) GO INSERT INTO #T2 VALUES (' John Smith') INSERT INTO #T2 VALUES ('Lisa Tran ') INSERT INTO #T2 VALUES ('Nicole  Ngo') INSERT INTO #T2 VALUES ('Brandon Lee') GO    SELECT *      FROM #T1;    GO       SELECT *      FROM #T2;    GO -- Desire results. FullName         TableName ---------------- --------- Joe  Smith       #T1   (2 spaces in between) April Smith      #T1   (space after Smith)  John Smith      #T2   (space in front) Lisa Tran  &

Search a word in all the tables(all columns) of a database

Dear Friends, I am developing the Home page of a Client. Apart from various things on this home page I have a text box and search button.Having said that, I have a database in which I have almost 12 tables with varying number of columns.Now my question is,Is there anyway to search a word typed by a user in the textbox to search it in all the tables(all columns) of the database.A simple,concise and easy to follow solution would be a great help.

Access 2007, SQL 2008 and linked tables


I have a bunch of databases running on a SQL server 2008 instance.  They're all set to the default Latin collation, and the server is set to UK English locale.


I have an access database using linked tables to the SQL server.  The lcal PC is Windows 7 and also set to English UK locale.


However, the date fields in the SQL server tables are interpreted by Access as "text" type, not date.  When I type a date into them in standard UK english format - dd-mm-yyyy, access accepts them but the SQL server rejects them because for some reason it is wanting to store the data in the format yyyy-dd-mm.


I realise I'm no expert, this is probably something really simple and I'm probably being stupid, but can anyone shed any light on WTF i going on here and why, and how I fix it.  I realise I could code in access forms something to force the date into yyyy-dd-mm format and re-interpret it to English when I want to display it, but that's clunky and horrible.


Any ideas gratefully received.  Thanks.

Problem with viewing grid with linked tables



My grid doesn't show on the web form when I configure its datasource to access the link table and display data from the receiver table. Both link and receiver tables are associated/linked in the .dml file. Any ideas why the grid doesn't show on the form?



Search Query From Multiple Tables



I have a order master table in which orderId is PK.

Now i have 5 Diffrent tables in which OrderId is FK. Column Name in each table is same.

I want to find all columns by orderId from all 5 tables. that means If i pass the orderid = 5 then query should check for each table and find the orderId = 5 and get all records from that table.

If you think any logic for solve this problem please write. I really thankfull if i got any clue for this.

Thanks & regards

Shwetamber Chourey


Problem with linked tables


I am linking to some Access 97 tables from SQL Server 2005, however, I have had a lot of problems. These are generally sorted out by restarting the SQL server, but after a while it fails again. (queries to XLS files on the same configuration are fine)

If I go to SQL Server Management studio and check the connection to the Access databases, I get a 'Cannot initialise data source object of OLE DB provider' error message. However, if I go to the provider properties for the Jet provider and deselect 'allow inprocess'. it works. If I reselect it, it fails.

Can anyone help?

SharePoint Gets Search Analytics

Microsoft's SharePoint Portal Server 2003 was sold into a large number of organizations based solely on the strength of the search tool. Organizations hungered for a way to find the data they had generated.

Using SharePoint Search feature in ASP.Net Application

Integrating ASP.Net application in to MOSS 2007 to utilize SharePoint Enterprise Search Feature can be done by using Business Data Search.

Get more then google search from here

Just make it home page and enjoy more then google search you not only get google result and prizes for searching but also free ebooks and link from here like orkut,facebook,twitter,yahoomail etc...


Adding Search Refinements in SharePoint 2010

I have been playing around with SharePoint 2010 Search this morning. I love the new UI. The search refinements panel is just begging to be messed with. In my case I wanted to add the file extension JPG as an Image Type refiner.

Temporary Tables - MS SQL Server

Usage of temporary tables in MS SQL Server is more developer friendly and they are widely used in development. Local temporary tables are visible only in current session while global temporary tables are visible across all sessions.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Search Engines and Multilanguage Websites - using .resx


I have a website (asp.net 3.5+c# +linq ) having thopition to change languages (2) by the user, Am using the search engine like in the example of:


this search will find any searched word in all the pages and return the link in the default language of the site, but problem for the second language , because by default the site language is English and the user have the option to change to other language.

and as I understood that the .resx files can not be searched like the aspx by the search engines.

I looked in many blogs and discussion boards for similar  case but unfortunately no clues on this issue .
The only same case posted :


and also I could not find any clue to move on, 

 Kindly requsted to guide me for the soultio

Thanks for your time and wish you all the best
your help is always appreciated


how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

Membership Search user


Is there a membership function to search a username Like this:   LIKE '%UserName%' ?

This is not working.

MembershipUser User = Membership.GetUser("%" + TextBox1.Text + "%");

Thank you.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend