Array With Sql Server 2000

May 11, 2006

hello
I have created one store procedures that return a table variable

'CREATE PROCEDURE sptcondconsiglieri @immobile_id varchar(6)
as
DECLARE @tbl table(condomio_id Varchar(6),titlo varchar(5),nominativo varchar(256),stato int)
DECLARE @colA nvarchar(50)
DECLARE @MyCursor CURSOR
/*declare @mycursor1 cursor*/

SET @MyCursor = CURSOR FAST_FORWARD
FOR
Select nome_consigliere
From t_immoconsiglieri
where immobile_id=@immobile_id
order by posizione
OPEN @MyCursor
FETCH NEXT FROM @MyCursor
INTO @ColA
WHILE @@FETCH_STATUS = 0
BEGIN



Insert @tbl
SELECT dbo.T_Condomini.Condomino_id,dbo.T_Condomini.titolo,dbo.T_Condomini.Nominativo,dbo.T_UniCond.StCon_id
FROM dbo.T_Condomini INNER JOIN
dbo.T_UniCond ON dbo.T_Condomini.Condomino_id = dbo.T_UniCond.Condomino_id INNER JOIN
dbo.T_Unita ON dbo.T_UniCond.Unita_id = dbo.T_Unita.Unita_id
WHERE (dbo.T_Condomini.Nominativo = @ColA) AND (dbo.T_UniCond.Dta_fine = '21001231') AND (dbo.T_Unita.Immobile_id =@immobile_id) and dbo.T_UniCond.StCon_id<>3
FETCH NEXT FROM @MyCursor
INTO @ColA
END

CLOSE @MyCursor
DEALLOCATE @MyCursor

select * from @tbl

/*SET QUOTED_IDENTIFIER OFF*/
GO
,
When i call store procedure with vb6
Dim rs as new adodb.recordset
Set cmd = New ADODB.Command
Dim pm As New ADODB.Parameter
' conn.BeginTrans
Set cmd.ActiveConnection = conn
cmd.CommandType = adCmdStoredProc
Set pm = cmd.CreateParameter("immobile_id", adVarChar, adParamInput, 6, immobile_id)
cmd.Parameters.Append pm
cmd.CommandText = "sptcondconsiglieri"
Set rs = cmd.Execute
If Not rs.EOF Then
'
Rs is close
I dont undestand why
Tank you

View 5 Replies


ADVERTISEMENT

Help With Inserting Array Contents To SQL Server 2000

Jan 29, 2007

I've been doing this in Access, but cannot find the answer to how to do it with SQL Server.
From a web form, a user can select a number of different dates.  The selected dates are held as text (not DateTime) in an ArrayList.
Clicking the Submit button writes the contents of the form to a database table.
This works for Access:
    insSQL &= "VALUES (@typEvent, @starts, @ends, @starts, @ends, @attend, @title, @room, @department, @contact, @address, @telephone, @email, @telefax, "    For i = 0 to datesArray.Count - 1      insSql &= datesArray.Item(i)    Next i
    insSQL &= "VALUES (@typEvent, @starts, @ends, @starts, @ends, @attend, @title, @room, @department, @contact, @address, @telephone, @email, @telefax, "    For i = 0 to datesArray.Count - 1      insSql &= "#" & datesArray.Item(i) & "#, "    Next i
It doesn't work for SQL Server, and when trying to insert the value "01/29/2007" I get the error message: "The name '#1' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted."
I have also tried the line:
    For i = 0 to datesArray.Count - 1      insSql &= satesArray.Item(i)    Next i
and get: "Incorrect syntax near the keyword 'VALUES'."
I'm not sure where to find the information to correct my error.
Any help would be appreciated.
Tinker
 

View 3 Replies View Related

Dose Sqlserver 2000 Support Array Type?

Mar 31, 2006

Any one know about it?

View 9 Replies View Related

RS2005: Export To Excel Error: Destination Array Was Not Long Enough. Check DestIndex And Length, And The Array's Lower Bounds.

Jan 25, 2007

All,

I am using Reporting Services 2005. One of my reports is getting the following error when I try to export to Excel. It will export to .CSV though.

"Destination array was not long enough. Check destIndex and length, and the array's lower bounds."

Any suggestions would be greatly appreciated. Please copy me at machelle.a.chandler@intel.com.

Machelle

View 10 Replies View Related

How Would I Send A String Array As A Integer Array?

Jun 25, 2007

I have a stored procedure that has a paramter that accepts a string of values. At the user interface, I use a StringBuilder to concatenate the values (2,4,34,35,etc.) I would send these value to the stored procedure. The problem is that the stored procedure doesn't allow it to be query with the parameter because the Fieldname, "Officer_UID" is an integer data type, which can't be query against parameter string type.
What would I need to do to convert it to an Integer array?
@OfficerIDs as varchar(200) 
Select Officer_UID From Officers Where Officer_UID in (@OfficerIDs)
 Thanks

View 5 Replies View Related

Array In SQL Server

Jan 27, 2004

How would one implement an array in SQL Server ?

Specically, i'm parsing a field into the array, and doing operations on these elements.

Thanks.

View 4 Replies View Related

Array Concepts In SQL Server 7.0 ?

Jun 30, 2000

I heard from my friend that, in "Oracle 8i", they have Array concepts.

Is there any "ARRAY CONCEPTS" available in SQL Server 7.0?. I have seen in BOL, there they have given command like,

"SetToArray(«Set»[, «Set»]...[, «Numeric Expression»])"

Like 'C'-Language, can we able to store datas in that. If that so, can anyone give explanations on that.

thanks in advance.
Srinivasan

View 1 Replies View Related

Declare An Array Of Int In SQL Server

Jul 20, 2005

Hi All,I want declare an array of int in SQL Serverplease help me to convert the following code from VB to TSQL------------Dim md_mon(12) As Integermd_mon(1) = 31-------------Thanks

View 4 Replies View Related

Array (or Similar Thing ) In Sql Server

Jul 4, 2005

I would like to write a fun or stored procedure to do some operation. It require me to know that what category is currently belong to certain people(people_table: category_table1               to           Many)However, when i use the select statement in stored proc, it return a set of result, not a scalar , therefore, i cannot use the variable to hold it. In addition, there are no array in SQL server.Question:1. Is there any way to hold the collection of result(like array)?2. Also, how to determine to use fun or stored procedure?(Since a integer is need to return by them)Thx

View 4 Replies View Related

Storing Byte Array In Sql Server

Jan 8, 2006

Hello, I am using .net 1.1 and sql server 2000.

I want to store a byte array, but it seems that only a string is stored there.

Code:

SHA512 sha = new SHA512Managed();

byte[] ReturnedPasswordByte = sha.ComputeHash(ToCryptByte);




MyGenericCommand.Parameters.Add("@Password", ReturnedPasswordByte);

MyConnection.Open();
MyGenericCommand.ExecuteNonQuery();
MyConnection.Close();


If I select the record later, all I get is "System.Byte[]" (as string)

View 1 Replies View Related

Possible To Move Array To Diff Server?

Jun 11, 2008

My main sql server lost the system board due to overheating. I need to get the (external enclosure scsi attached)array up and running as it has production data as well as SQL backups stored there. My most recent/valid backups are located with the production data. It is possible to connect this array to different server? This is a HP DL380 and all of my other servers are Dell 2900's.

any help is appreciated!

View 1 Replies View Related

SQL Server 2005 Partitions And SAN Array

Jul 3, 2007


I am looking for information/suggestions in regards to portioning data across a large SAN. The database is several TB in size, and we are looking to partition the data on a date so that the current data is always the fastest available and history can be set as read only but still be available.

If the server has 8 drive letters how can I ensure that the 4 data drives are stripped across the most physical drives for the most through-put??

Are there any specific questions I need to ask the server technicians?

Any pitfalls I should be aware off??

Thanks!!!

View 1 Replies View Related

Array Data Type In SQL Server 2005

Aug 9, 2006

Hi,

I was migrating from Oracle to SQL Server 2005 using SSMA (SQL Server Migration Assistant) but i`ve found an issue, i can´t find how to fix it. In my stored procedure in PL/SQL exists this lines:

TYPE T_ARRAY_COL IS VARRAY (1000 ) OF VARCHAR2 (50);
A_COLUMNS T_ARRAY_COL := T_ARRAY_COL();

Somebody know how can i simulate this data type ARRAY. I was reading http://msdn.microsoft.com/msdnmag/issues/04/02/TSQLinYukon/ but some things are not clear for me.... please help me, give me one hand.

Thank you

David



View 1 Replies View Related

Array Data Type In SQL Server Stored Procedures?

Aug 17, 2000

Is there any array data type in SQL Server 7.0. I am using VB 6.0 with ADO 2.1. I am populating a MSFlexGrid with values that I pass to SQL Server one at a time and insert into the database. What I would like to do is pass the entire contents of the Grid at once to a stored procedure and let SQL do the processing so my routine is not going back and forth to the client. I did not find any documentation on any array data types in SQL. What is my best approach to this problem?
Thanks,
Dan Collins

View 6 Replies View Related

Passing A List/array To An SQL Server Stored Procedure 2005

Aug 16, 2007

Hi, I m using sql 2005 as a back end in my application...
I am useing Store procedure..for my data in grid..
 
ALTER PROCEDURE [dbo].[ProductZoneSearct]
(
@Productid char(8),@Proname char(8),@radius int,@mode varchar(5) = 'M',@Zone nvarchar(1000),)
ASSET NOCOUNT ON;Create Table #Product (ProductID int, TimeEntered datetime, DateAvailable datetime, Productname varchar(80), City varchar(50), State char(4),Miles decimal, Payment varchar(40),UserID int, Phone varchar(15))
Insert #Product Select ProductID , TimeEntered, DateAvailable, Productname ,City,State,miles,Payment ,Miles, UserID, Daily, PhoneFrom [tblproduct] Where city IN (@Zone)
Select ProductID TimeEntered, DateAvailable, Productname City,State,miles,Payment ,Miles, U.Phone As phoneNumber, Company, , L.Phone As cmpPhone From #Product As L Left Join (Select UserID, Company, Phone, From [User]) As U On U.UserID = L.UserID  Order By DateAvailable
 
if i pass value in "where city in (@Zone)" and @Zone ='CA','AD','MH'  then it can not get any result..but if write where city in ('CA','AD','MH') then it give me perfact result..
I tried to below syntax also but in no any user Where city IN ('+@Zone+')
In short if i pass value through varibale (@Zone) then i cant get result...but if i put  direct value in query then only getting result..can anybody tell me what is problem ?
Please Hel[p me !!!
Thank you !!!

View 5 Replies View Related

SQL Server 2008 :: Splitting Param Array Into Groups Of Four With Offset

Feb 25, 2015

I'm getting a file that essentially has a parameter array: a specific like would have three known values, and then x number of groups of four parts;

The question is how to handle logical groups of parameters; i though maybe by using a modulous on their itemnumber ...

So I can easily use DelimitedSplit8K to definitively find the first thee values, but how do I dynamically get X number of groups of four; eventually i need the first three fields combined with each quadgroup.

So a rough example of the desired output is this:

this:
'03,0000001,USD,010,81257946,,,015,121809761,,'is split into rows with the first three columns included in each row:
030000001USD01081257946NULLNULL
030000001USD015121809761NULLNULL

Here's a setup i've put together:

IF OBJECT_ID('tempdb.[dbo].[#AccountIdentifier]') IS NOT NULL
DROP TABLE [dbo].[#AccountIdentifier]
GO
CREATE TABLE [dbo].[#AccountIdentifier] (
[AccountIdentifierID] INT IDENTITY(1,1) NOT NULL,
[DateReceived] DATETIME NULL DEFAULT getdate(),
[RecordCode] VARCHAR(3) NULL,

[Code] ....

View 2 Replies View Related

Can I Keep Sql Server 2000 If Upgrade Win 2000 To Win 2003 (was Sql Server 2000)

Feb 24, 2005

Hello, i have a question that the sql server 2000 is install in window 2000 server. If i want to update to window 2003. Is that any problem in sql server 2000. I am worry about whether we will have problem after update. What i need to do? Many thanks.

View 5 Replies View Related

How Insert An Array Into Sql Server 2005 Using VB.2005

Mar 4, 2008

I have the text file parsed into an array.  How to insert that into  SQLServer Database? (VB 2005)
 Thanks,
Siby

View 3 Replies View Related

SQL SERVER 2000: In Which Format The Datetime Will Be Stored In Sql Server 2000?

Feb 28, 2008

Hi All,
I would like to know, how the datetime will be stored in the sqlserver datetime column.
Because some time i am giving the date in dd/mm/yyyy and sometime mm/dd/yyyy.
while give the date in mm/dd/yyyy works fine but not in the another case. and also while i execute a query on query analyser it shows the datetime in
yyyy/mm/dd format.
So anyone can please tell me how the dates will be stored in the datetime column of sqlserver database?
Thanks in Advance.
Regards,
Dhanasekaran. G

View 2 Replies View Related

Upgrading SQL Server 2000 Standard To SQL Server 2000 Enterprise

Sep 14, 2004

I am currently running SQL Server 2000 Standard on my production system, and I am looking to upgrade the system to Windows 2000 Adv. Server. I would also like to upgrade SQL Server 2000 Standard to SQL Server 2000 Enterprise to utilize more than 2GB of memory. Can anyone tell me what is the best way to upgrade the system, and please provide some feedback on your experiences with the upgrade. Thanks in advance.

View 2 Replies View Related

Sql Server 2000 Linked Server To Access 97/2000 Incompatability

Jul 20, 2005

We are experiencing a problem with Sql Server 2000 linking to anAccess 97 file. We have two machines that link to this .mdb file, andwe recently upgraded one to newer hardware, SP3a, MDAC 2.8, etc. Thelink on this upgraded machine no longer works, giving this message:Server: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.[OLE/DB provider returned message: Cannot open a database created witha previous version of your application.]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'IDBInitialize::Initialize returned 0x80004005: ].The link on the older machine still works. We decided to tryconverting a copy of the file to Access 2000 to see if the newerpatches/drivers/whatever no longer supported 97. We set up a link onboth machines to this file, and they both work. However, on theupgraded machine, the following error is receievedServer: Msg 7399, Level 16, State 1, Line 1OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.[OLE/DB provider returned message: System resource exceeded.]OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0'ICommandText::Execute returned 0x80004005: ].when making 1-3 connections to the the linked server, while the oldermachine supports at least 7 simultaneous queries connecting to thelinked server and still hasn't produced that error.Does anyone have any idea if there is a known issue with linking toAccess 97/2000 files under MDAC 2.8, Jet 4.0, etc? Any light anyonecan shine on this subject would be greatly appreciated.

View 1 Replies View Related

SQL Server 2000 Standard On Windows 2000 Advanced Server

Jul 20, 2005

What is the limitation of memory that SQL Server 2000 Standard can usewhen running on a Windows 2000 Advanced Server platform?

View 1 Replies View Related

Upgrate Sql Server 2000 Standard To Sql Server 2000 Enterprise

Sep 15, 2006

Hi, I need to know if somebody knows like making the update of Standard SQL 2000 to Enterprise. Greetings.

View 3 Replies View Related

Array

Jul 17, 2007

how can i send array from asp.net to sql?

View 3 Replies View Related

DB File Size Limit With SQLServer 2000 In Small Business Server 2000

Mar 15, 2006

Thanks in advance. What is maximum SQL Server database (*.mdf) file size with SQL Server 2000 as part of Microsoft Small Business Server 2000? (Database files were limited to 10 GB in SBS 4.5 with SQLServer 7.0... has this changed?).

View 1 Replies View Related

Sql Server 2000 Developer Edition W/MSDE 2000 Release A Install

May 21, 2005

Can you install Sql Server 2000 Developer Edition with MSDE 2000 release A already installed?

View 2 Replies View Related

Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A

Feb 17, 2004

My objective is to use Enterprise Manager to move (copy) my SQL db from the server to my windows desktop computer.

I downloaded MSDE and am having trouble installing it, no doubt because I do not understand the documentaion (ReadMeMSDE2000A.htm).

When I try to run setup, I get that message that says:

"A strong SA password is required for security reasons. Please use SAPWD switch to supply the same."

Considering my purpose, do I need a "strong" SA password? If not, how do I get around it? If yes, how do I set it up?

I am a Mac user so I have poor windows skills, please make it as painless as possible for me, thanks!

Ron

View 3 Replies View Related

Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release

Feb 16, 2006

venu writes "Hi,

Am very new to MS SQL adminstration
Can anybody help me out how to work on Microsoft SQL Server 2000 Desktop Engine (MSDE 2000) Release A just for the practice.

The activity which am going to workout on MSDE is below.

How to install SQL(on XP)
How the layout will be(like if i insall MSDE what are all Application will be and how they depends on each other)
How to create/delete tables if so, how can we do it either by GUI or CUI

just i need a clarifications reg same

Thank you,
venu"

View 1 Replies View Related

Performance Issues - Access 2000 Frontend SQL Server 2000 Backend

Jul 23, 2005

Hi,Simple question: A customer has an application using Access 2000frontend and SQL Server 2000 backend. Data connection is over ODBC.There are almost 250 concurrent users and is growing. Have theysqueezed everything out of Access? Should the move to a VB.Net frontendtaken place ages ago?CheersMike

View 4 Replies View Related

Vista Business ODBC/DSN To Remote Windows 2000 Server / SQL 2000

Oct 8, 2007

Hi,
Just upgraded some development desktops to Vista Business. However we need
to still connect to some older remote windows 2000/SQL 2000 servers.

Trying to setup an ODBC system DSN on our Vista Business local desktop we get the
following errors -

-START ERROR WINDOW-
Connection Failed:
SQLState: '01000'
SQL Server Error: 772
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(SECDoClientHandshake()0.
Connection failed:
SQLState: '08001'
SQL Server Error: 18
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SSL Security Error
-END ERROR WINDOW-

Any help greatly appreciated as this is stopping us from making
database/table connections etc. We've checked the firewall setup and all is well there.

PS - we can still connect fine using XP or windows 2000 desktops and their
local DSNs.

View 8 Replies View Related

Maximum Capacity Specifications Comparison Table For Access, SQL Server 7, 2000 And MSDE 2000

May 27, 2008











Parameter
Access 2000/XP
SQL Server 7.0
SQL Server 2000
MSDE 2000

Number of instances per server
n/a
n/a
16
16

Number of databases per instance / server
n/a
32,767
32,767
32,767

Number of objects per database
32,768
2,147,483,647
2,147,483,647
2,147,483,647

Number of users per database
n/a
16,379
16,379
16,379

Number of roles per database
n/a
16,367
16,367
16,367

Overall size of database (excluding logs)
2 GB
1,048,516 TB
1,048,516 TB
2 GB

Number of columns per table
255
1024
1024
1024

Number of rows per table
limited by storage
limited by storage
limited by storage
limited by storage

Number of bytes per row





(Excluding TEXT/MEMO/IMAGE/OLE)
2 KB
8 KB
8 KB
8 KB

Number of columns per query
255
4,096
4,096
4,096

Number of tables per query
32
256
256
256

Size of procedure / query
64 KB
250 MB
250 MB
250 MB

Number of input params per procedure / query
199
1,024
2,100
2,100

Size of SQL statement / batch
64 KB
64 KB
64 KB
64 KB

Depth of subquery nesting
50
32
32
32

Number of indexes per table
32
250 (1 clustered)
250 (1 clustered)
250 (1 clustered)

Number of columns per index
10
16
16
16

Number of characters per object name
64
128
128
128

Number of concurrent user connections
255
32,767
32,767
5

View 1 Replies View Related

Get Array Value From A Loop?

Jun 19, 2006

Hi, I am trying to do a loop while a list of array is assigned ('CHP,CNH,COW') ... I am using comma seperator to get each list value ... but, it donest really do what I am trying to do ... pls help!!! How do I loop through each value and do the rest ...??
=====================================
DECLARE @ABBR AS NVARCHAR(50)SET @ABBR = 'CHP,CNH,COW'
DECLARE @SEP AS NVARCHAR(5)SET @SEP = ','
 WHILE  patindex('%,' + @ABBR + ',%',  @ABBR ) > 0    BEGIN
   -- do the rest
END

View 1 Replies View Related

SQL Query In A VB.net Array

Jan 31, 2007

I want to do a query on an SQL Server 2005 db and have the results returned into aarray or collection in vb.net... how do I do this? I know the basicconnection and stuff.. just not how to get the result to an array thanks!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved