473,320 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

[scripts] prompting user

please, how to promt user in mu sql 2005 script? For example, I need user to
confirm some operations.. .

Thx in advance
Dec 21 '06 #1
10 2334

"fireball" <fi******@onet.kropka.euwrote in message
news:em**********@nemesis.news.tpi.pl...
please, how to promt user in mu sql 2005 script? For example, I need user
to confirm some operations.. .
Unless something has changed in T-SQL 2005 that I'm not aware of, you can't.

Thx in advance

Dec 21 '06 #2
that is cruel.
Dec 21 '06 #3
so, I neither I can't call one script from another (from the batch I run),
right?

:(
Dec 21 '06 #4

"fireball" <fi******@onet.kropka.euwrote in message
news:em**********@nemesis.news.tpi.pl...
so, I neither I can't call one script from another (from the batch I run),
right?
No, you can do that.

>
:(

Dec 21 '06 #5
fireball (fi******@onet.kropka.eu) writes:
please, how to promt user in mu sql 2005 script? For example, I need
user to confirm some operations.. .
The answer is you don't. SQL Server is a server application, and
server applications communicate with client applications, not with
end users.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 21 '06 #6
Sql is 4gl and asking it to do 3gl operations like prompts and loops
and if then else logic should be illegal although now allowed.

fireball wrote:
please, how to promt user in mu sql 2005 script? For example, I need user to
confirm some operations.. .

Thx in advance
Dec 22 '06 #7
well,
is that possible at least, to exit script on given condition?
Dec 28 '06 #8
fireball wrote:
well,
is that possible at least, to exit script on given condition?
Do you want a return code or not? If you don't want a return code
then you can wirite:
If <conditionReturn
If you want a return code then you need to use a stored proc and inside
the procedure you can write:
If <conditionreturn 100
In your application you can check for status of the called procedure
and take action based on that.

Dec 28 '06 #9
fireball (fi******@onet.kropka.eu) writes:
is that possible at least, to exit script on given condition?
Depends on how run it. In SQLCMD or OSQL you can exit immediately
by using a RAISERROR with state 127:

RAISERROR('Got a good reson for taking the easy way out now', 16, 127)

This does not work from Query Analyzer or Mgmt Studio.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Dec 28 '06 #10
Uzytkownik "Erland Sommarskog" <es****@sommarskog.senapisal w wiadomosci
RAISERROR('Got a good reson for taking the easy way out now', 16, 127)
Uzytkownik <ot*******@yahoo.comnapisal w wiadomosci
If <conditionReturn

all this hepled.
Dec 29 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: danijela.simunovic | last post by:
Hi! Is there a way that when I run a "make table query" and an "append query" that i won't be asked those 2 or 3 questions from access like :"you are about to run a make table...","the existing...
1
by: Jefferson Cowart | last post by:
I am writting a program that has a button that a user can click to start isntalltions of various software across the network. Some of the software is on a network share that is password protected....
7
by: mattmerc | last post by:
Hi all, We have all seen lot of method for exporting datagrids to Excel. I have a slightly different need. I think it should be easy to accomplish but I am not sure how. I would like when a user...
11
by: uoL | last post by:
Hello, I'd like to know how to prompt two values with prompt(); function. I need to get things like 'pass' and 'user, 'article' and 'value', etc ... in a document and I dont want to make a...
9
by: Joe | last post by:
Every time our application starts it prompts the user to allow it access to the internet because our application is checking for updates. Is there anyway programically to tell Vista to allow this...
1
by: jeffkatyspanky | last post by:
I am prompting for the user to enter an IP address and I can't figure out a cleaner way to re-prompt if the user enters something other than a valid IP address. I'd like to just clear the "bad" entry...
1
by: cdm2883 | last post by:
the first one! 1) takes vaule 1 as a command line parameter 2) takes vaule 2 as a command line parameter 3) outputs a result which adds vaule 1 to itself vaule 2 number of times . the...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net page, it uses js to print in IE. It always has the prompting user window appear. I have tried: <input onclick="document.all.WebBrowser.ExecWB(6,6)" type="button"...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi mister, I have an Winforms app (Client) and Web app + WCF Services + Windows Services (Server). In server, I have installed SQL SERVER 2000. Now, I want create a installer (MSI.exe or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.