Use this tag for questions related to declare, which is usually meant for declaring variables, statements, etc.
Questions tagged [declare]
736 questions
0
votes
2 answers
Java: how to declare these variables as 'global'/public?
Alright guys, this is a pretty basic question, but it's something I'm not completely sure about. In the example below, I have built a simple calculator with two edittexts (for number entry) and two buttons (add and subtract). At the moment, I am…

Sam
- 97
- 2
- 4
- 11
0
votes
2 answers
Python loop for multi statement
Simple declare in python is like.
x = 1
y = 1
z = 1
make it easier...
x,y,z = [1] * 3
but for function "statement"...
import wx
self.Bind(wx.EVT_MENU, self.exc11, id=exc11id)
self.Bind(wx.EVT_MENU, self.exc15, id=exc15id)
…

dsewq1LYJ
- 25
- 1
- 1
- 5
0
votes
1 answer
Error with MySQL, DECLARE
I am using MySQL v5.0.92 and I'm trying to import some data, but I get an error on declare my variables.
BEGIN
DECLARE flag INT;
DECLARE id INT;
while flag=0 begin
SET id=(SELECT top 1 user_id
FROM ac_user_info WHERE user_id>@id…
0
votes
1 answer
How to Update a row with some declard and setted Values
Hi i struggle with my stored-procedure which adds 'NULL' instead of a number
So why does the following procedure adds 'NULL' instead of a value between 0 and infinity?
Here is my procedure
ALTER PROCEDURE [dbo].[Plan_Abschluss]
-- My parameters…

WiiMaxx
- 5,322
- 8
- 51
- 89
0
votes
2 answers
Difference between declaring IBoutlet depending on where it declare
We can declare like this for IBOutlet. Can I know what is the difference/advantages between 1 and 2 declaring method style?
@interface CurrentJobDetailsVC ()
{
IBOutlet UISegmentedControl *segControl; // -> 1
}
@property (weak, nonatomic)…

Khant Thu Linn
- 5,905
- 7
- 52
- 120
0
votes
1 answer
declare variable in stored procedure sql 2008
I am working on a project which uses a stored procedure. When I try to use the stored procedure in the project, I'm getting this error:
The formal parameter "@Mode" was not declared as an OUTPUT parameter, but the actual parameter passed in…

7alhashmi
- 924
- 7
- 24
0
votes
0 answers
Php pdo_dblib sql server pagination
I can execute query like this against sql server:
DECLARE @ROWS INT = 2, @PAGE INT = 2
SELECT *
FROM (
SELECT *,
ROW_NUMBER() OVER (ORDER BY ID) AS _NO
FROM [Reports].[dbo].[Cycle]
) AS SOD
WHERE SOD._NO BETWEEN ((@PAGE-1)*@ROWS)+1
AND…

monstersmart
- 39
- 3
0
votes
1 answer
How to declare a FK, uniqueidentifier in a SQL cursor
I am unsure how to declare a uniqueidentifier in a sql cursor. Right now I have it defined as nvarchar (50) for @activity_id but I am afraid that is not correct.
declare @activity_id nvarchar (50)
declare @fullname nvarchar(200)
declare cur cursor…

Matt Weick
- 332
- 6
- 19
0
votes
1 answer
Declare Function statment VBA to VB.Net and array dimensionality
I have an object wrapper of some XLL functions in a VBA object, which object I am trying to translate to vb.net, as a COM dll add-in. The VBA declares the XLL functions like so:
Private Declare Function ExternalFunction Lib "C:\MyLibrary.xll"…

RomnieEE
- 618
- 3
- 12
0
votes
1 answer
PHP form ints not declared
Newb here trying to build a form that works with ints to count how many red shirts die in a classic episode of star trek (exercise to get better with forms and ints). I have an error which reads as '7 Error message: Undefined index: rsTot'. I have…

Chezshire
- 713
- 5
- 13
- 32
0
votes
1 answer
n this call to SQL db how do I declare @k1, @k2, @k3?
This is a query from Minitab to SQL db.
In this call to SQL db how do I declare @k1, @k2, @k3?
ODBC;
Connect "DSN=STEConversion;APP=Minitab 17 Statistical Software;WSID=CMM-OFF" &
"ICE;DATABASE=STEConversion;Trusted_Connection=Yes";
…

jmccafferty
- 1
- 1
0
votes
2 answers
Declaring Dates Conversion error
not sure what is wrong here but can someone help me here. I'm not to familair with declaring datetime in SQL.
declare @START datetime2 = '2013-07-17 00:00:00.00';
declare @END datetime2 = '2013-07-17 23:59:99.99';
select a.scheduledstart as…

Matt Weick
- 332
- 6
- 19
0
votes
1 answer
Declare varchar in python
How can i declare a variable in sql in python ?
I have tried this so fare:
import re
import sqlite3
conn = sqlite3.connect('imdb1.db')
c = conn.cursor()
c.execute('''CREATE TABLE imdb1 (ROWID int, Title varchar(40), Rating int)''')
x =…

Alexander Marcussen
- 145
- 3
- 15
0
votes
1 answer
Cassandra Declare and Working with Variables
I couldn't find any example/article about working with inline variables in cql.
Basically my structure is like this;
1 Keyspace(x)
2 Tables (a,b)
I have to select result from x.a to code first and then send them to x.b
As you can see i have to go…

burakakkor
- 335
- 3
- 12
0
votes
1 answer
The different ways of declaring objects in R
We have
=
<-
<<-
Can someone explain exactly what they do? If there are any more? When I use <<-, it seems to mess my functions but, but I want to declare things globally so I have them when the function is done (I don't want to return them…

wolfsatthedoor
- 7,163
- 18
- 46
- 90