472,973 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 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 2329

"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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.