Showing posts with label creat. Show all posts
Showing posts with label creat. Show all posts

Wednesday, March 7, 2012

How to creat a sp for insert datas...

hi.. guys...

i want to thank the people who answered my previous thread..

ii want to know how to creat a stored procedure with insert commands that need to be call from a servlet using callableStatement..

i want to know how to create the stored procedure in sql..

i have two tables login_details(username,password), personal_details(Name,Age,dob)..

With advanced thanks..

Ur's

Rams

Quote:

Originally Posted by subramanian_pks

hi.. guys...

i want to thank the people who answered my previous thread..

ii want to know how to creat a stored procedure with insert commands that need to be call from a servlet using callableStatement..

i want to know how to create the stored procedure in sql..

i have two tables login_details(username,password), personal_details(Name,Age,dob)..

With advanced thanks..

Ur's

Rams


---------------
create procedure sp_insert_login
@.username as char(100),
@.password as char(100)
as
insert into login_details(username,password)
values(@.username,@.password)

How to creat a first DB?

Hello all,

I've Installed VS2005 and MSSQL express with it. I used to work with mssql 2003 enterprise edition where it had "Enterprise Manager" from which I could create and modify my Databases.

How do I creat a new database with MSSQL express?

I've tried to do this via visual studio 2005 "server explorer". I"m entering the "Create new SQL Server Database" dialog, I select my server's name and my new database name and I recive an error message which says "An error has occurred while estabilishing a connection to the server" and it also says that

"When connecting to SQL server 2005, this failure may be caused by the fact that under the defult settings SQL sever does not allow remote connections".

How do configure my MSSQL express to allow the remote connection?

Thanks in advance!

With the new SQL 2005 systems you need to use the new Management Studio to perform the same tasks as the Older Enterprise Manager and Query tools. With the full versions this is included, for the basic express product you can get a smaller version from the Microsoft Downloads site, Called SQL Management Studio Express.

In the case of remote connections have a look at this support article... http://support.microsoft.com/default.aspx/kb/914277

|||

How to configure SQL Server 2005 to allow remote connections

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

|||Thanks a lot guys :)|||


Hi,

also have a look at the screencast section on my site, which will show you a walkthrough for your problem.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

How to creat a DataBase?

I have a DataBase name Customer

Customer have 30 Tables name table1 、table2、table 3...

I want to have a DataBase name Customer_Offile with same Table same column like Customer ( the Customer_Offlike will used to a backup DataBase)

How to wirte a script for copy Customer?

thank you very much

Database YourDB has full backup YourBaackUpFile.bak. It can be restored using following two steps.

Step 1: Retrive the Logical file name of the database from backup.

RESTORE FILELISTONLYFROM DISK ='D:BackUpYourBaackUpFile.bak'GO

Step 2: Use the values in the LogicalName Column in following Step.

--Make Database to single user ModeALTER DATABASE YourDBSET SINGLE_USERWITH ROLLBACK IMMEDIATE--Restore DatabaseRESTORE DATABASE YourDBFROM DISK ='D:BackUpYourBaackUpFile.bak'WITH MOVE'YourMDFLogicalName'TO'D:DataYourMDFFile.mdf',MOVE'YourLDFLogicalName'TO'D:DataYourLDFFile.mdf'--If there is no error in statement before database will be in multiuser mode.--If error occurs please execute following command it will convert database in multi user.ALTER DATABASE YourDBSET MULTI_USERGO
|||

sorry but .. I can' t really understand

if the DB I want to create a Backup DB named Customer

does the code should be

ALTER DATABASE Customer
SET SINGLE_USERWITH ROLLBACK IMMEDIATE -- what does Set single_user with rollback immediate? what does this code for?
 
if I just want a DB have same table same column as Customer I don't need to copy any Data from Customer
does the steps is
1 copy Customer as a new DB
2 delete the Data from the new DB?
how to delete ?
thank you 

|||

As your problem is concerned you may follow these steps:

1. Take a backup of your respected databse.

2. Delete the data of table and remain the table structure in your table use the folllowing command:

DELETE TABLE <"table name">

3. Insert your fresh data in the table

As you use this command, your table structure remain same(no table structure modify or delete).

How to creat a database via SQL Querry Analyzer to a Web Server

I am new to ASP.NET and met a problem about access a database on a Web Server (www.myserver.com). My meaning here that I created a .sql from my localhost to test, but when to upload to my web server on the internet, an error occured: "System.Data.SqlClient.SqlException: SQL Server does not exist or access denied".
Anyone here can help me to solve my problem. Waiting for your reply soon. Thanksyour SQL Connection on your local host and your Server aren't the same. your should check your connectionstring, eypecially the servername.|||First of all thank to MISIU...
Your idea i had to try first! Just here, I change my line of code from <Add key> to a connection string to myserver for instance hereby. But nothing looked good and still got the above problem. Could you pls show me the detail of creat a database and publish it to my Web Server. And i am waiting for anyone give me the BEST. God bless all of you!