Storing Data Lager Than 8000 Charactors In Mssql Server 2000

Feb 20, 2007

HI

i want to save data larger than 8000 charactors in a colomn

is there any way to do it in mssql server 2000 desktop addition

plz help me

Thanks in advance

View 14 Replies


ADVERTISEMENT

Server Configuration For MSSQL 2000 And MSSQL 2005

Sep 6, 2006

Does enabling/disabling Data Execution Prevention have a performanceimpact on SQL 2000 or SQL 2005?For SQL best performance - how should I configure for:Processor Scheduling:Programs or Background servicesMemory Usage:Programs or System Cache

View 9 Replies View Related

Storing Staging Data As XML In SQL 2000.

Aug 25, 2005

Scenario:
We want to stage all data coming into our database from various
applications.  We have a generic control where all data goes
through to get to the database.

We want have the data staged in a 'staging database'.  My question
is, what would be the best way to store the staging database in the
database.

I'm thinking storing it as XML in a SQL column.  The reason for
this is because the data could change from application to
application.  It would be impossible to create a relational table
because maintenance would be a nightmare.

Has anyone ever done something like this.  Would you save the node names in another table in SQL?

Any help would be appreciated as I'm new to XML.

Thanks,

ScAndal

View 1 Replies View Related

8000 Max Size ? In SQL 2000

May 27, 2008

Hi
I have a BULK INSERT task to do, inserting
contents of a file per row.. (not lines total contents of text files)
but it seems 8000 is the max size of a field in SQL 2000 ?

is this the case ?

View 6 Replies View Related

Storing Xml In Sql Server 2000

Sep 21, 2005

Hi,
I am aggregating some in-coming XML SOAP envelopes and I need to persist them to the database.

Is there a recommended data type to handle this? Should I be using ntext, text or other data type?

I know in Sql Server 2005 there will be a specific Xml Data Type; but, that is not an option until Nov 7, 2005.

View 3 Replies View Related

Image Storing In SQL Server 2000

Apr 15, 2007

HI,
Kindly Guide me how to store picture files in SQL server 2000 using Visual studio 2005
 
 

View 3 Replies View Related

Storing Time In SQL Server 2000

Jul 20, 2005

HI there,I currently store the date using the getdate() functionbut how can I store just the time or seperate the time off from adatetime datatype?M3ckon*** Sent via Devdex http://www.devdex.com ***Don't just participate in USENET...get rewarded for it!

View 4 Replies View Related

Is Storing Images In MSSQL Feasible?

Sep 20, 2005

Hi,

I need to know if storing images in the MSSQL database is a viable option when compared to having them in a different directory and only storing their location or address in the DB.

I ask this with reference to the performance of the DB. Will having many images of huge size on the databse make it slow for retrieval as the MDX or database file size would eventually increase?

Does the size of the database file has to do anything with MSSQL query performance?

Comments on this will be appreciated.

Thanks

View 6 Replies View Related

Transfer Data To Hostserver MSSQL-2000

Jul 17, 2006

Thanks for the replies,

As per the querys:
------------------------
1) I am trying to use the Database of my host (hosting server of datapacket). They have a support for MS-SQL-2000. Therefore surely the server is there. After my CPanel configuration i got the Database Server IP (67.122.X.X), Port - 1433, SQL Server user and pasword.

2) In my local machine SQL Server 2000 is installed. Where the databse and DNS is configured.

Now, from this local machine how can i transfer the data to the host machine (remote SQL Server).

Simpliy copying Files *.MDG and *.LDf files it is not working. And i don't have access to the remote SQL-SERVER as it is in the host machine of datapacket. I can only configure it throuch there Control Panel and throuch FTP can copy the required files in there machine. I have a user in that remote MS-Sql server that all i have.

As per my understanding after the control panel configuration the database and the DNS is created in the remote Sql-Server of datapacket. Now all i have to do is transfer the data & tables. HOW TO DO THAT?????

I have tried using Export but it fails to connet the remote database.

Thanks in Advance

Dipya

View 1 Replies View Related

Which Is Better? Storing Data In The Database OR Storing It In The File System

Dec 29, 2006

Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?    

View 6 Replies View Related

Display Image To ASP .NET From Bynary Data MSSQL 2000

May 16, 2007

Hi I have image in database sql server 2000 and want to display in ASP .net page. I make the memorystream from that data and write directly to page using Response.Write([bynary stream]) but U know it only display one image and other HTML is gone.
 Normaly a HTML or ASP.net page will display image using local files like this <img src=.............> but how if I want to display it from memory stream that doesn't have physically in storage ? Or should I save that binary to storage first and then reference it ?
So anyone that have solution for this problem please help me  how to this thing ............

View 3 Replies View Related

Feasability Of Storing PDFs And WORD.DOC Files In MSSQL?

Jul 23, 2005

I'm building a system when one can upload a document to the website.I will be storing the document on the hard-drive for quick/easy access,but I was also thinking of storing it in an existing database since mostof the sites information is all stored there.As well there would be only one place to worry about backing up. And ifthe file on the hard-drive was ever missing or became corrupted, I couldrestore it form tha database. Is this feasable? Has anyone ever done this?--* Don VaillancourtDirector of Software Development**WEB IMPACT INC.*phone: 416-815-2000 ext. 245fax: 416-815-2001email: Join Bytes! <mailto:donv@webimpact.com>web: http://www.web-impact.com/ This email message is intended only for the addressee(s)and contains information that may be confidential and/orcopyright. If you are not the intended recipient pleasenotify the sender by reply email and immediately deletethis email. Use, disclosure or reproduction of this emailby anyone other than the intended recipient(s) is strictlyprohibited. No representation is made that this email orany attachments are free of viruses. Virus scanning isrecommended and is the responsibility of the recipient./

View 5 Replies View Related

Storing &&amp; Retrieving Audio &&amp; Video Files In SQL Server 2000

Sep 17, 2007

Hello,

Please help me find solution to these questions?

1. How do I store audio and video files in sql server 2000.
2. Is it possible to store and retrieve audio and video files using t-sql
3. Which is the most efficient way to store and retrieve audio and video files in sql server

Your suggestions are most valued.

Thanks!

View 6 Replies View Related

Compare Data-type Xml In A Temp/variable/physical Table In MSSQL 2000

May 22, 2008

Does abyone know how to compare data-type xml in a temp/variable/physical table in MSSQL 2000?

I tried this works in MSSQL 2005,



Code Snippet
create Table #t1 ([c1] int identity(1,1) not null, [c2] text)
create Table #t2 ([c1] int identity(1,1) not null, [c2] text)
Insert into #t1
Values('This is a test')
Insert into #t2
Values('This is a test')
Select * from #t1
Select * from #t2
Select * from #t1 where [c2] LIKE (Select [c2] from #t2)
drop table #t1
drop table #t2


but not MSSQL 2000.

Server: Msg 279, Level 16, State 3, Line 12
The text, ntext, and image data types are invalid in this subquery or aggregate expression.


Is this true (from BOL)?




Code SnippetIn comparing these column values, if any of the columns to be compared are of type text, ntext, or image, FOR XML assumes that values are different (although they may be the same because Microsoft® SQL Server„¢ 2000 does not support comparing large objects); and elements are added to the result for each row selected.

View 1 Replies View Related

Creating Index In MSSQL 2000 From MSSQL 2005

Mar 24, 2008

Hi,

I am a bit new to the MSSQL server. In our application, we use so many SQL queries. To imporve the performance, we used the Database enigine Tuning tool to create the indexes. The older version of the application supports MSSQL 2000 also. To re-create these new indexes, I have an issue in running these "CREATE INDEX" commands as the statements generated for index creation are done in MSSQL 2005. The statements include "INCLUDES" keyword which is supported in MSSQL 2005 but not in MSSQL 2000.

Ex:-

CREATE INDEX IND_001_PPM_PA ON PPM_PROCESS_ACTIVITY

(ACTIVITY_NAME ASC, PROCESS_NAME ASC, START_TIME ASC, ISMONITORED ASC)

INCLUDE

(INSTANCE_ID, ACTIVITY_TYPE, STATUS, END_TIME, ORGANIZATION);


Any help in creating such indexes in 2000 version is welcome.

Thanks,
Suresh.

View 2 Replies View Related

Generating Script For MSSQL 2000 From MSSQl 2005?

May 3, 2008

Hello
We are using SQL 2005 and now we are planning to use SQL 2000. what are the ways to do the process.

We taken the script spcificall for 2000 and run it in SQL 200. But we are getting the error in SCRIPT?

Could you please give me the step to do?

Thanks,
Sankar R

View 6 Replies View Related

MSSQL Express 2005 Vs. MSSQL 2000

Jun 15, 2006

Ben writes "I have a sql script that doesn't function very well when it's executed on a SQL 2000 server.

The scrpt looks like this:


---------------------------------------------------------------------------------------------------
USE [master]
GO
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
EXEC sp_addlogin N'SSDBUSERNAME', N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
If EXISTS (Select * FROM master.dbo.syslogins WHERE loginname = N'SSDBUSERNAME')
ALTER LOGIN [SSDBUSERNAME] WITH PASSWORD=N'SSDBPASSWORD'
GO
GRANT ADMINISTER BULK OPERATIONS TO [SSDBUSERNAME]
GO
GRANT AUTHENTICATE SERVER TO [SSDBUSERNAME]
GO
GRANT CONNECT SQL TO [SSDBUSERNAME]
GO
GRANT CONTROL SERVER TO [SSDBUSERNAME]
GO
GRANT CREATE ANY DATABASE TO [SSDBUSERNAME]
GO
USE [master]
GO
IF EXISTS (select * from dbo.sysdatabases where name = 'ISIZ')
DROP DATABASE [ISIZ]
GO
USE [SurveyData]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
GO
USE [SurveyManagement]
GO
exec sp_adduser 'SSDBUSERNAME'
GRANT INSERT, UPDATE, SELECT, DELETE
TO SSDBUSERNAME
---------------------------------------------------------------


I need to be converted to a script that can be executed on both MSSQL 2000 and MSSQL 2005.

I was wondering if somebody there could help me with this problem?!

Thanks,
Ben"

View 1 Replies View Related

Migration MSSQL 2000 32-bit To MSSQL 2005 64-bit

Nov 17, 2007

I've been tasked to move our production databases on MSSQL 2000 to 2005. I've supported MSSQL since version 6.5 and performed migrations to successor versions.

Current Environment is MSSQL 2000 32-bit with current Service Packs.

I've performed mock migrations on Test servers upgrading all Production instances simultaneously from MSSQL 2000 to 2005 32-bit. The Test environment is identical to Production minus server name, IP etc. Also I have a separate server with MSSQL 2005 installed where I use the DETACH / ATTACH and BACKUP / RESTORE method for migration / acceptance testing. There are approximately 30 databases totaling 70 GB. This has gone as expected and fairly successful. Vendors have been coordinated with to update code and staff for acceptance testing.

I'd prefer going directly to MSSQL 2005 64-bit instead if possible due to memory benefits etc. This is where I'd like some feedback prior to borrowing a 64-bit server for testing.

Upgrade options:

1. Is it better to migrate from MSSQL 2000 32-bit to 2005 64-bit via:
a. DETACH / ATTACH
b. BACKUP / RESTORE
c. Is one method more advantageous relating to the end result?
2. Regarding XP clients, have issues been experienced with the default SQL Server driver or is an alternate recommended for XP clients to connect to a MSSQL 64-bit server databases?
3. If you have performed this migration and have relevant experience please pass them along.

View 3 Replies View Related

Backup MSSQL 2000 On ASP Server

Dec 21, 2006

Hi I'm an experienced programmer, but just don't have much experience with ASP or MSSQL. I inherited a website and now need to set up an automated backup system for a fairly large (40MB) MSSQL database hosted by a 3rd party provider of reasonable quality with ASP and SQL Server 2000. Let's avoid ASP.NET solutions since the website I inherited is written in "straight up" ASP (old school).

I have access to the database, login etc. I'm thinking I should combine an ASP script with the database connectivity and write daily/weekly backups to a dir on the hosting server.

Where do I begin? Tools? Examples?

Thanks for any assistance.

Stoob

View 1 Replies View Related

Migration From DB2 To MSSQL Server 2000

Feb 16, 2004

Hi Friends,

I am doing my final semester project. It is a migration tool that converts the DB2 PL dialect into MSSQL Server's T-SQL dialect.
I am in need of sample DB2 PL files(procedures, UDFs, triggers) for testing the tool. Please point out me to some DB2 files repository links or if you have some files, please give me the same. I will use this only for testing purposes.

Appreciate your help.

Thanks & Regards,
Jake

View 2 Replies View Related

Reinstalling MSSQL Server 2000 Over-the-top?

Nov 12, 2007

Hello,

I've got a weird problem that started today on our SQL server at work. Apparently the transaction logs filled up for one DB, and SQL server decided to create 230 gb of errors on the subject, filling my D: drive. Well, I had no problem deleting the error logs and truncating the transaction logs, but my Enterprise Manager MMC will no longer function.

Search results turned up a fix that worked for most people, but not for me. So I'm pretty sure I've got no choice but to reinstall over-the-top. But, will this cause any loss of existing databases (obviously back them up first), users/security, and scheduled tasks (db backups, etc)?

I'd like to do minimal damage to this thing because there are several DB's set up from before my time, and I don't have time to manage this thing completely (as you might have guessed, no one really manages things here). Any help is appreciated.

View 4 Replies View Related

Storing Serialized Data In Sql Server CE????????

Feb 19, 2008

Hi
is it possible to store a SQL CE command object in SQL Server CE database.
If so then what would be the datatype of such column????


thanx in advance

View 1 Replies View Related

Export Access DB To MSSQL Server 2000

Jun 19, 2004

Hello,

I am working on a couple fo the ASP.NET walkthoughs and I would like to practice with a Database that I created in Access. I realize that I could use the Access DB, but I would like to learn to work with a more industrial strength DB. Is there a method to export to MSSQL server 2000 from Access ?

Regards,

James

View 4 Replies View Related

MSSQL 2000 And SQL Server 2005 Express

Jul 5, 2006

Hi,

Does anybody know if MSSQL 2000 and SQL Server 2005 Express Edition can live together on the same machine?

I need to keep MSSQL 2000 up and running while evaluating the SQL Server 2005 Express Edition.

Thank you,
Paul

View 2 Replies View Related

How I Can Register MSSQL Server 2000 By IP Address

Oct 7, 2004

How I can register MSSQL Server 2000 by IP Address-

I installed MSSQL Server 2000 sp3a, Enterprise edition on windows 2000 advanced server box with sp4. It’s primarily give instance with name like servername/sqlindia, Where sqlindia is instance and servername is physical machine name.

I would like to registration of sqlserver instance by IP Address. How I can do it.


Thanking You

R.Mall

View 1 Replies View Related

Adding Fonts To MSSQL 2000 Server

Aug 17, 2005

Hallo, this is my first post, i need to add arabic fonts to mssql 2000 server, there is an existing fonts for arabic such as tahoma(arabic), the problem is that when i insert data with arabic fonts, when i retrieve it it appears as question marks, ?????,
is there a way to solve this,
thanks in advance,

View 2 Replies View Related

MSSQL Server 2000 Eval. Expired!

Jan 17, 2007

I was expecting a warning but I turned on my computer and discovered that MSSQL Server 2000 eval. has expired. At this time, and in the foreseeable future, I cannot afford a retail version. But I would like to upgrade to MSSQL Server 2005 Express.

Have I lost all my data? What can I do?

View 5 Replies View Related

Connecting To MSSQL Server 2000 Using JDBC

Jun 18, 2007

Hello,

I am developing an application which needs JDBC connection to a Named Instance of SQL Server 2000 (other than default instance). I am facing problem in this regard as my code gives an exception "Time Out" or "Connection Failed". However it works fine with the default named instance...The main driver class is "com.microsoft.sqlserver.jdbc.SQLServerDriver"

and Connection URL is

"jdbc: sqlserver://localhost;instanceName=Testing:1432;databaseName=testDB;"



It gives the exception that Unable to connect to named instance....



Please if any one have any knowledge in this regard....do let me know....I have read an article on MSDN according to which on MS SQL Server 2000 the named Instance other than default can be accessed only through named pipes.

http://msdn2.microsoft.com/en-us/library/aa224779(sql.80).aspx



if some body can tell me Connection string for JDBC driver which utilizes named pipes...the it will be very help full for me.........any help from MSDN Experts is really appreciated...

Thanks

View 4 Replies View Related

MSSQL Server 2000 Error Setup Fail To Configure Server

Nov 14, 2006

I have searched and could not find an answer for this one I read log and it said
Starting Service ...

SQL_Latin1_General_CP1_CI_AS

-m -Q -T4022 -T3659

Connecting to Server ...

driver={sql server};server=KENSHIN;UID=sa;PWD=;database=master

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

driver={sql server};server=KENSHIN;UID=sa;PWD=;database=master

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

driver={sql server};server=KENSHIN;UID=sa;PWD=;database=master

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

SQL Server configuration failed.

how do I fix this?

View 7 Replies View Related

Storing Arabic Data In Db(sql Server 2005)

Oct 1, 2007

Hi,
How to insert or store arabic data into a table in sql server 2005, also i want to retrieve it as arabic format.But now it insert  (?????) like this.Please help me to find a solution. 
Regards
Sabna S

View 3 Replies View Related

Storing DATA To Sql Server From Access Efficiency

Jun 13, 2008

 I have a function which is writing thousands of records coming from Access database and I was wondering if someone can suggest how can reconstruct my code for faster processing. Here my code: Public Sub MigrateNFSData(ByVal calcTbl As DataTable, ByVal strDBConnection As String)        Dim sqlServerConn As New SqlConnection(strDBConnection)        'Define stored procedures        Dim command As New SqlCommand        Dim getAccID As New SqlCommand("GetAccountID", sqlServerConn)        Dim getActionID As New SqlCommand("GetActionID", sqlServerConn)        Dim getExchangeID As New SqlCommand("GetExchangeID", sqlServerConn)        'Dim getParrentAccID As New SqlCommand("GetParentAccID", sqlServerConn)        Dim getStatusID As New SqlCommand("GetStatusID", sqlServerConn)        Dim getTraderID As New SqlCommand("GetTraderID", sqlServerConn)        Dim getGroupID As New SqlCommand("GetGroupID", sqlServerConn)        Dim getGroupIDByIP As New SqlCommand("GetGroupIDByIP", sqlServerConn)        Dim getTraderIDByIP As New SqlCommand("GetTraderIDByIP", sqlServerConn)        'Define insert records stored procedures        Dim insertAcc As New SqlCommand("InsertAccount", sqlServerConn)        insertAcc.CommandType = CommandType.StoredProcedure        Dim insertAction As New SqlCommand("InsertAction", sqlServerConn)        insertAction.CommandType = CommandType.StoredProcedure        Dim insertExchange As New SqlCommand("InsertExchange", sqlServerConn)        insertExchange.CommandType = CommandType.StoredProcedure        Dim insertGroup As New SqlCommand("InsertGroup", sqlServerConn)        insertGroup.CommandType = CommandType.StoredProcedure        Dim insertStatus As New SqlCommand("InsertStatus", sqlServerConn)        insertStatus.CommandType = CommandType.StoredProcedure        Dim insertTrader As New SqlCommand("InsertTrader", sqlServerConn)        insertTrader.CommandType = CommandType.StoredProcedure        Try            sqlServerConn.Open()        Catch ex As Exception            MessageBox.Show("Connection failed to open!")        End Try        'Set parameters to helper Get Stored Procedures to retreive Id's         getAccID.Parameters.Add("@AccName", SqlDbType.NVarChar)        getAccID.CommandType = CommandType.StoredProcedure        getActionID.Parameters.Add("@ActionName", SqlDbType.NVarChar)        getActionID.CommandType = CommandType.StoredProcedure        getExchangeID.Parameters.Add("@ExchName", SqlDbType.NVarChar)        getExchangeID.CommandType = CommandType.StoredProcedure        'getParrentAccID.Parameters.Add("@ParentName", SqlDbType.NVarChar)        'getParrentAccID.CommandType = CommandType.StoredProcedure        getStatusID.Parameters.Add("@StatusName", SqlDbType.NVarChar)        getStatusID.CommandType = CommandType.StoredProcedure        getTraderID.Parameters.Add("@TraderName", SqlDbType.NVarChar)        getTraderID.CommandType = CommandType.StoredProcedure        getGroupID.Parameters.Add("@GroupName", SqlDbType.NVarChar)        getGroupID.CommandType = CommandType.StoredProcedure        getGroupIDByIP.Parameters.Add("@IP", SqlDbType.NVarChar)        getGroupIDByIP.CommandType = CommandType.StoredProcedure        getTraderIDByIP.Parameters.Add("@IP", SqlDbType.NVarChar)        getTraderIDByIP.CommandType = CommandType.StoredProcedure        command = New SqlCommand("InsertTradeTransaction", sqlServerConn)        command.CommandType = CommandType.StoredProcedure        'Set Parameters for Insert stored procedures        insertAcc.Parameters.Add("@Account", SqlDbType.Text)        insertAction.Parameters.Add("@ActionName", SqlDbType.Text)        insertExchange.Parameters.Add("@Exchange", SqlDbType.Text)        insertGroup.Parameters.Add("@Group", SqlDbType.Text)        insertGroup.Parameters.Add("@ACCID", SqlDbType.Int)        insertGroup.Parameters.Add("@GroupID", SqlDbType.UniqueIdentifier)        insertStatus.Parameters.Add("@StatusName", SqlDbType.Text)        insertTrader.Parameters.Add("@Group", SqlDbType.UniqueIdentifier)        insertTrader.Parameters.Add("@IP", SqlDbType.Text)        insertTrader.Parameters.Add("@TraderName", SqlDbType.Text)        insertTrader.Parameters.Add("@TraderID", SqlDbType.UniqueIdentifier)        'Adding stored Get Stored Procedure's parameters-----------------------        command.Parameters.Add("@OrderNum", SqlDbType.Text)        command.Parameters.Add("@ACC_ID", SqlDbType.Int)        command.Parameters.Add("@Group_ID", SqlDbType.UniqueIdentifier)        command.Parameters.Add("@Trader_ID", SqlDbType.UniqueIdentifier)        command.Parameters.Add("@Exch_ID", SqlDbType.Int)        command.Parameters.Add("@Date", SqlDbType.DateTime)        command.Parameters.Add("@Time", SqlDbType.DateTime)        command.Parameters.Add("@ActionID", SqlDbType.Int)        command.Parameters.Add("@StatusID", SqlDbType.Int)        command.Parameters.Add("@TimeSent", SqlDbType.DateTime)        command.Parameters.Add("@Qty", SqlDbType.Int)        command.Parameters.Add("@Product", SqlDbType.Text)        command.Parameters.Add("@MMYYY", SqlDbType.Text)        command.Parameters.Add("@ExchOrderID", SqlDbType.Text)        command.Parameters.Add("@TimeTicks", SqlDbType.Int)        command.Parameters.Add("@W2G", SqlDbType.Int)        command.Parameters.Add("@W2Exch", SqlDbType.Int)        command.Parameters.Add("@G2ExchDerived", SqlDbType.Int)        command.Parameters.Add("@Msg", SqlDbType.NVarChar)        'command.Parameters.Add("@ExchDate", SqlDbType.DateTime)        'command.Parameters.Add("@ParentID", SqlDbType.Int)        'Paremeters Defenition--------------------------------------        'Parsing DateTime Objects        Dim formaterA As IFormatProvider        formaterA = New System.Globalization.CultureInfo("en-GB", True)        Dim dateObj As Date        'DEBUG        'Dim rows = calcTbl.Rows.Count        Dim colValues = GetColumnsValues(calcTbl)        'Write table with computed NFS data to sql server DB        For Each dr As DataRow In calcTbl.Rows            Dim orderNo = dr.Item("Order No").ToString()            command.Parameters("@OrderNum").Value = dr.Item("Order No").ToString()            getAccID.Parameters("@AccName").Value = dr.Item("Acct").ToString()            If getAccID.ExecuteScalar() = Nothing Then                insertAcc.Parameters("@Account").Value = dr.Item("Acct").ToString()                insertAcc.ExecuteNonQuery()                getAccID.Parameters("@AccName").Value = dr.Item("Acct").ToString()                command.Parameters("@ACC_ID").Value = getAccID.ExecuteScalar()            Else                command.Parameters("@ACC_ID").Value = Int32.Parse(getAccID.ExecuteScalar()).ToString()            End If            getGroupID.Parameters("@GroupName").Value = dr.Item("Group ID").ToString()            If getGroupID.ExecuteScalar() = Nothing Then                'Find Group by IP address if input Data Table doesn't have group                getGroupIDByIP.Parameters("@IP").Value = dr.Item("IP").ToString()                If getGroupIDByIP.ExecuteScalar() = Nothing Then                    insertGroup.Parameters("@GroupID").Value = Guid.NewGuid                    insertGroup.Parameters("@Group").Value = dr.Item("Group ID")                    insertGroup.Parameters("@ACCID").Value = getAccID.ExecuteScalar()                    insertGroup.ExecuteNonQuery()                    command.Parameters("@Group_ID").Value = getGroupID.ExecuteScalar()                Else                    command.Parameters("@Group_ID").Value = getGroupIDByIP.ExecuteScalar()                End If            Else                command.Parameters("@Group_ID").Value = getGroupID.ExecuteScalar()            End If            getTraderID.Parameters("@TraderName").Value = dr.Item("Trd ID").ToString()            If getTraderID.ExecuteScalar() = Nothing Then                getTraderIDByIP.Parameters("@IP").Value = dr.Item("IP").ToString()                If getTraderIDByIP.ExecuteScalar() = Nothing Then                    insertTrader.Parameters("@Group").Value = getGroupID.ExecuteScalar()                    insertTrader.Parameters("@IP").Value = dr.Item("IP").ToString()                    insertTrader.Parameters("@TraderName").Value = dr.Item("Trd ID").ToString()                    insertTrader.Parameters("@TraderID").Value = Guid.NewGuid                    insertTrader.ExecuteNonQuery()                    command.Parameters("@Trader_ID").Value = getTraderID.ExecuteScalar()                Else                    command.Parameters("@Trader_ID").Value = getTraderIDByIP.ExecuteScalar()                End If            Else                command.Parameters("@Trader_ID").Value = getTraderID.ExecuteScalar()            End If            getExchangeID.Parameters("@ExchName").Value = dr.Item("Exch").ToString()            If getExchangeID.ExecuteScalar() = Nothing Then                insertExchange.Parameters("@Exchange").Value = dr.Item("Exch").ToString()                insertExchange.ExecuteNonQuery()                command.Parameters("@Exch_ID").Value = getExchangeID.ExecuteScalar()            Else                command.Parameters("@Exch_ID").Value = getExchangeID.ExecuteScalar()            End If            getActionID.Parameters("@ActionName").Value = dr.Item("Action").ToString()            If getActionID.ExecuteScalar() = Nothing Then                insertAction.Parameters("@ActionName").Value = dr.Item("Action").ToString()                command.Parameters("@ActionID").Value = getActionID.ExecuteScalar()            Else                command.Parameters("@ActionID").Value = getActionID.ExecuteScalar()            End If            getStatusID.Parameters("@StatusName").Value = dr.Item("Status").ToString()            If getStatusID.ExecuteScalar() = Nothing Then                insertStatus.Parameters("@StatusName").Value = dr.Item("Status").ToString()                insertStatus.ExecuteNonQuery()                command.Parameters("@StatusID").Value = getStatusID.ExecuteScalar()            Else                command.Parameters("@StatusID").Value = getStatusID.ExecuteScalar()            End If            'getParrentAccID.Parameters("@ParentName").Value = ""            'If getParrentAccID.ExecuteScalar() = 0 Then            'insert parent acc            'Else            'command.Parameters("@ParentID").Value = getParrentAccID.ExecuteScalar()            dateObj = Date.Parse(dr.Item("Exch Date").ToString(), formaterA)            command.Parameters("@Date").Value = dateObj            command.Parameters("@Time").Value = DateTime.Parse(dr.Item("Time").ToString())            command.Parameters("@TimeSent").Value = DateTime.Parse(dr.Item("Time Sent").ToString())            If (dr.Item("Qty").Equals(System.DBNull.Value)) Then                command.Parameters("@Qty").Value = System.DBNull.Value            Else                command.Parameters("@Qty").Value = Int32.Parse(dr.Item("Qty").ToString())            End If            command.Parameters("@Product").Value = dr.Item("Product").ToString()            command.Parameters("@MMYYY").Value = dr.Item("MMMYY").ToString()            command.Parameters("@ExchOrderID").Value = dr.Item("Exchange Order ID").ToString()            If (dr.Item("Time Ticks").Equals(System.DBNull.Value)) Then                command.Parameters("@TimeTicks").Value = System.DBNull.Value            Else                command.Parameters("@TimeTicks").Value = Int32.Parse(dr.Item("Time Ticks").ToString())            End If            'command.Parameters("@ExchDate").Value = Date.Parse(dr.Item("Exch Date").ToString())            'command.Parameters("@ExchDate").Value = Convert.ToDateTime(dr.Item("Exch Date").ToString())            'DEBUG            'Dim strW2G = dr.Item("W2G").ToString()            'Dim strW2E = dr.Item("W2E").ToString()            If (dr.Item("W2G").Equals(System.DBNull.Value)) Then                command.Parameters("@W2G").Value = System.DBNull.Value            Else                command.Parameters("@W2G").Value = Int32.Parse(dr.Item("W2G").ToString())            End If            If dr.Item("W2E").Equals(System.DBNull.Value) Then                command.Parameters("@W2Exch").Value = System.DBNull.Value            Else                command.Parameters("@W2Exch").Value = Int32.Parse(dr.Item("W2E").ToString())            End If            'command.Parameters("@G2ExchDerived").Value = Int32.Parse(dr.Item("Time Delta G2E").ToString())            If (dr.Item("Time Delta G2E").Equals(System.DBNull.Value)) Then                command.Parameters("@G2ExchDerived").Value = System.DBNull.Value            Else                command.Parameters("@G2ExchDerived").Value = Int32.Parse(dr.Item("Time Delta G2E").ToString())            End If            command.Parameters("@Msg").Value = dr.Item("Msg").ToString()            command.ExecuteNonQuery()        Next        sqlServerConn.Close()    End Sub

View 3 Replies View Related

Multiple Types Of Data Storing In SQL Server

Mar 22, 2007

Hello All,

We are developing customer support application. We will have so many customers after launching this product. But my problem is how will i store data of all these customers in SQL Server. Please suggest me.

View 1 Replies View Related

Need Help In Writing A Stored Procedure In MSSQL Server 2000

Mar 29, 2007

Hi Everybody,

I am trying to update a column Percentage in a table named Critical Doctors with a column named

PercentTime from tblPercent table, Where the column Doctor matches with any DoctorId from

tblPercent.

I am getting an error message for the following query.

Have Two tables

1.CriticalDoctors
2.tblPercent

update CriticalDoctors set Percentage =
(select PercentTime from tblPercent)
where CriticalDoctors.Doctor = (select DoctorId from tblPercent)

Server: Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=

, >, >= or when the subquery is used as an expression.
The statement has been terminated.

Pls give me reply on how to write a stored procedure so that I can equate the percentage column

with one value and also check the condition with one value.

Thanking you guys in advance.

madhav

View 4 Replies View Related







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