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

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

how to get Notepad all Item in sql server database table field

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net


I have one asp.net application using Sql server as back end.. in sql server database i have one table which consist two fields.. ItemName and Rate

I have one notepad file which consist around 700 ItemName with Rate.. 

So how to get this ItemName and Rate in my Table...

View Complete Post

More Related Resource Links

How to create a view in my database from a table in another server/database

Is there a way to create a view in my database referencing a table in another server/database if I have the connection information.  I know how to do it in Oracle, simply create a database link, but have never done so in sqlserver.

sharepoint New Item form database table

hi, i want to know if i create a custom list in sharepoint designer and i modify it with my own fields. when the user filled this form where in the database are the filled data stored. thus in witch table in the wss_content db will the data be stored?

SSRS2005: Is it safe to manually remove instances from the Keys table in the report server database?

I have a problem with redundant reporting services instances still hanging around in the initialization pane of the RS configuration wizard and I can't get rid of them. The problem arose when we had new webfarms and before I had removed all references to the old ones from the initialization screen, the old webfarms had been switched off, removed from the network and dismantled. Therefore when I try to 'de-initialize' them, I get an error stating that reporting services cannot connect to them and when I run reports, a fair few are trying to run on the old webfarms which no longer exist and are disappearing into the void. There's a table in the report server database called Keys whch contains details of these intances and i'm wondering if its safe to remove these via SQL commands without breaking reporting services on other machines.   As a side note: All this stems from the fact that when you uninstall Reporting Services, not all of the files / references are removed. So as a general word of warning, if you do an uninstall of RS2005, you'll need to make sure everything's gone before re-installing, throwing away old machines etc. These include folders in IIS and these old instances as mentioned above.  

Slow performance when searching in "any part of field" of a SQL Server database using a Microsoft Ac

We have just migrated our back end database from Access to MS SQL Server 2008 R2. We have noticed better performance on our searches - unless we select to search in "any part of field" in Access (with Access' built-in search function - we use a mix of Access 2003 and 2007). This takes nearly 20 seconds to find the result, whereas before the migration it was taking 5-7 seconds (compared to instant results we now experience when searching for whole fields). The main fields we search are not large - usually just two words. Obviously it is better to search for a whole or start of a field, but this is not always possible. The contractor that assisted us in this project has told us that this "is just the way SQL works with Access". Is this really true? I find it hard to believe two MS products would have such a big issue between them. I presumed using SQL with an Access front end would be a common setup, which is why I thought this must be a problem with our setup. Is there any way to fix this speed issue?

How to submit data to a SQL Server database table from a custom page ?

Using SPD, I have created a custom page. It has a form with ASP.NET controls textbox, radio buttons, dropdown, submit button etc., Also, I created a Database connection (to the SQLServer database table) under Database Connections. But not sure how to connect this form to the database connection so that when form data is submitted, the data will be inserted into the table.

multiple access to sql server database, one table


I have multiple apps running which access a sql server database. I had initially a table set aside for each app but now I was told to put everything into one table and have all apps access the database. I just want to make sure that just changing my connection string for all apps will suffice and that I do not have to make any other changes for all apps to write to one table. Will this be ok? The apps are writing to the database table which has a unique index on one column and a auto incremented primary id key. I changed the stored procedures I had for each app since the connection strings were the same as they access the same database. Just want to make sure there will be no conflict issues when each tries to write to the same table. None of the apps will be querying the table at any time except when I run manual queries myself.

Sql Server 2005 table item limit



I am having a file which is contain 70,000 data. i try to upload this file into sql server table using front end sharepoint server.i am getting time out period expired error.

So please help me to solve this issue





MS SQL Server Stored Procedure - Writing on a table in another another database


I am writing a stored procedure in a database for an app that will become part of a "shell" program that was written to accept an endless # of VB.Net apps.

The stored procedure will look at data in a table on that database, but the end result is that I want to update a table that exisits in A DIFFERENT database on the same server. I think I am referencing the table itself correctly, (databasename).dbo.(tablename). The problem is that the SQL is not performing as it does if I manually run the SQL in the database I'm trying to update.

Here is the SQL:





/****** Object: StoredProcedure [dbo].[usp_ARReport] Script Date: 10/25/2010 14:43:20 ******/



Adding a new field to a table via script in sql server management studio

I know how you can script to and create a new table but how about adding a new field to this table? For example: how would i add a new varchar(50) field named mynewfield?

USE [example]
/****** Object: Table [dbo].[Password]  Script Date: 10/26/2010 10:17:30 ******/
CREATE TABLE [dbo].[Password](
	[user_id] [int] NOT NULL,
	[password] [varchar](30) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response1] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response2] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[response3] [varchar](40) COLLATE SQL_Latin1_General_CP850_BIN2 NULL,
	[user_id] ASC

ALTER TABLE [dbo].[Password] WITH CHECK ADD CONSTRAINT [User_Password_FK1] FOREIGN KEY([user_id])
REFERENCES [dbo].[User] ([id])
ALTER TABLE [dbo].[Password] CHECK CONSTRAINT [User_Password_FK1]

Getting server non system databases, getting database tables, getting table columns


I use next code to get server databases

string connectionString = "Data Source=DENIS\\SQLEXPRESS;Integrated Security=SSPI;";
DataTable tables = new DataTable("Tables");
using (SqlConnection connection =
    new SqlConnection(connectionString))
  SqlCommand command = connection.CreateCommand();
  command.CommandText = "sp_databases"; 
  command.CommandType = CommandType.StoredProcedure;


this.dataGridView1.DataSource = tables;

I've got many databases :

- model ( i guess it is system )

- master ( i guess it is system )

- tempdb ( i guess it is system )

- db1 ( my table )

and etc.

How to determinate what table is system.



FROM information_schema.Tables

So how to determinate what table is system or not.

Can I get tables of database

How to archieve the field template that can update or insert multiple field value in database table,



How to archieve the field template that can update or insert multiple field value in database table,please? 

Import xls file into sql server database table in asp.net


I have one xls file which has 1.98 lacs rows. Whenever I try to import it in sql database table then I am getting following error to open OLE db connection.

External table is not in the expected format.

My code:

string con = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("TowerWorkOrders20110316.xls") + ";Extended Properties=\"Excel 12.0\"";       

 //string con = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("TowerWorkOrders20110317.xls") + ";Extended Properties=Excel 8.0";        

OleDbConnection connection = new 

OleDbDataReader reader;        
 OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet1$]", connection);        
reader = command.ExecuteReader();.................

How to upload a file to web server in asp.net and store file path into database table?

This article describe how to upload a file into web server folder using asp.net file upload control and store the file information into sql server database.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Connestion string create any database server

This links important to how to create connection string to any data base sever.
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