Thursday, March 29, 2012

about activeX script error in ssis package in SQL server 2005

when i run activex Script it's shows this error

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438

Moving from .NET Framework Data Access and Storage...|||So is there a solution to this?
I've had a similar error when using the "scripting.filesystemobject" from within a script task in ssis.

about activeX script error in ssis package in SQL server 2005

when i run activex Script it's shows this error

[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438

Moving from .NET Framework Data Access and Storage...|||So is there a solution to this?
I've had a similar error when using the "scripting.filesystemobject" from within a script task in ssis.

about accessing subReport's item

Hi all,
Is there anyone know how to access subReport's item? For example, can i use:
Reports!subReport.controls.textbox1.value in main report to access
subreport's textbox value? I have tried that, but failed. :-(
Thanks,
LisaHello Lisa,
Sadly no, I dont think you can do that.
The only property that I recall when looking at the IL that is exposed on a
ReportItem appears to be the Value property and that's I think is typed as a
String.
So on a report itself you can have a TextBox say called "TextBox1" and that
might be bound to a value from the database, and then you could bind another
TextBox to the first one with this syntax
=ReportItems!TextBox1.Value.
This kind of trick we discuss on p378 and 379 of our book where we explain
that it is useful for when you want to get image content from a DataSet into
a Report Header or Footer.
Peter Blackburn
Author: Hitchhiker's Guide to SQL Server 2000 Reporting Services
www.sqlreportingservices.net
"Lisa" <Lisa@.discussions.microsoft.com> wrote in message
news:8BDED34A-EC44-41B0-AC89-4763086BD414@.microsoft.com...
> Hi all,
> Is there anyone know how to access subReport's item? For example, can i
> use:
> Reports!subReport.controls.textbox1.value in main report to access
> subreport's textbox value? I have tried that, but failed. :-(
> Thanks,
> Lisa

about accessing SQL Server2005 database file from a remote computer

hi every one. i am a new user of asp.net 2.0 using C# code and i am facing a problem in accessing a SQL Server2005 database file in the remote computer. i have connected two pc with peer to peer connection and trying to add a databse using the "Add connection" option from the visual studio 2005. in the add connection dialog box it is showing me the remote server and it was supposed to show all the database in that SQL Server when i select one. but when i am choosing the server name it was not showing me anything. by the way i have configuered the surface area for "both TCP/IP and named pipes" and both the pc's server browser is turned on. is it the right way to access a database file from a remote pc or not?? please send me a good solution to do this things and try to explain the codes with example. waiting for response...plz send me the solution.. as soon as possible

Hi,

Try the following KB article, it may be helpful to you.

http://support.microsoft.com/kb/316649

Thanks.

|||

Hi,

SQL Server 2005 is not allowing remote connections by default. You have to configure the SQL Server 2005 for remote connections using SQL Server Surface Area Configuration tool.

If you refer to article athttp://www.kodyaz.com/content/SQLServerdoesnotallowremoteconnections.aspx , you may see how you can use this tool for allowing remote connections for a sql server instance.

Eralper

sql

About accessing data from sqlserver

Hello sir,
I have installed .net1.1version on windows2003 operating system.I have also installed sqlserver2000 on the same system.
My problem is that when i am trying to get data from sqlserver from asp.net program i am getting error as
'access denied to user NT AUTHORITY/NETWORK USER'.
I request you to kindly suggest me with an appropriate solution.
Thanking you.
Please email meon:-aanandkumar786@.yahoo.comeither the account that asp.net uses to run pages needs to be given access to the database, or you need to create your sql connection string with a specific sql server account to allow for the authentication.

about a WHERE

Hi, I think this is an easy stuff but not for me.. I have an application
running on a production server.
In my DB I have a Sales Table like this
SaleDate Product Price$
2005-02-18 00:00:00.000 1 500
2005-02-18 00:00:00.000 1 100
2005-02-18 00:00:00.000 3 200
Using SP I'm getting a total by Date by product (e.g For SaleDate =
2005-02-18 Product 1 = 600, Product 3 = 200)
Now also I need to Store the times like this
SaleDate Product Price$
2005-02-18 09:37:39.000 1 500
2005-02-18 09:30:09.000 1 100
2005-02-18 14:20:10.000 3 200
How should I modify my SP to get the same..I tried this:
Where CONVERT(CHAR(10),SaleDate ,112) = ''' +
CONVERT(CHAR(10),@.ParameterDateIn,112) + ''''
but it does nothing, the SP return a total for each row
thks.If you want daily totals per product for the given data, try:
select
convert (datetime, convert (char (8), SaleDate, 112), 112) as SaleDate
, Product
, sum (Price) as Total
from
Sales
group by
convert (datetime, convert (char (8), SaleDate, 112), 112)
, Product
order by
SaleDate
, Product
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
.
"Kenny M." <KennyM@.discussions.microsoft.com> wrote in message
news:7D87C046-13C6-4DE7-8932-4BC5BE369155@.microsoft.com...
Hi, I think this is an easy stuff but not for me.. I have an application
running on a production server.
In my DB I have a Sales Table like this
SaleDate Product Price$
2005-02-18 00:00:00.000 1 500
2005-02-18 00:00:00.000 1 100
2005-02-18 00:00:00.000 3 200
Using SP I'm getting a total by Date by product (e.g For SaleDate =
2005-02-18 Product 1 = 600, Product 3 = 200)
Now also I need to Store the times like this
SaleDate Product Price$
2005-02-18 09:37:39.000 1 500
2005-02-18 09:30:09.000 1 100
2005-02-18 14:20:10.000 3 200
How should I modify my SP to get the same..I tried this:
Where CONVERT(CHAR(10),SaleDate ,112) = ''' +
CONVERT(CHAR(10),@.ParameterDateIn,112) + ''''
but it does nothing, the SP return a total for each row
thks.|||This should answer your question..
given that the SaleDate is a datetime (you have seconds in your second
snippet)
DECLARE @.Date datetime
SET @.Date = '20050218' -- no seconds in here
... WHERE SaleDate>=@.Date AND SaleDate<@.Date+1
-- note the >= on LHS and the < on RHS to prevent overlaps
If possible, dont cast the column in your table to compare it as that
precludes the optimiser from using an index s (I hate it when the
optimiser does implicit casts on the column rather than the variable).
Mr Tea
"Kenny M." <KennyM@.discussions.microsoft.com> wrote in message
news:7D87C046-13C6-4DE7-8932-4BC5BE369155@.microsoft.com...
> Hi, I think this is an easy stuff but not for me.. I have an application
> running on a production server.
> In my DB I have a Sales Table like this
> SaleDate Product Price$
> 2005-02-18 00:00:00.000 1 500
> 2005-02-18 00:00:00.000 1 100
> 2005-02-18 00:00:00.000 3 200
> Using SP I'm getting a total by Date by product (e.g For SaleDate =
> 2005-02-18 Product 1 = 600, Product 3 = 200)
> Now also I need to Store the times like this
> SaleDate Product Price$
> 2005-02-18 09:37:39.000 1 500
> 2005-02-18 09:30:09.000 1 100
> 2005-02-18 14:20:10.000 3 200
> How should I modify my SP to get the same..I tried this:
> Where CONVERT(CHAR(10),SaleDate ,112) = ''' +
> CONVERT(CHAR(10),@.ParameterDateIn,112) + ''''
> but it does nothing, the SP return a total for each row
> thks.
>
>

about a SQL script

Dear All,
i recently would like to drop a table, then create a new one and then
insert the value to that new table
i have write a script as below:
use test
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Titles]
GO
SELECT * INTO [dbo].[Titles]
FROM [other_table].[dbo].[Titles]
GO
Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
GO
it work fine if it use one database only but my server have 20
databases, and all the database would like to have that modification.
So is there any method to automatically do the modification using a
script?
i really cant figure it out, i hope someone have give me a help
thanks you very much.NEMA,
You could use sp_MSForEachdb (an undocumented stored procedure) as described
at:
http://www.mssqlcity.com/Articles/Undoc/SQL2000UndocSP.htm
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185463821.216208.166530@.z24g2000prh.googlegroups.com...
> Dear All,
> i recently would like to drop a table, then create a new one and then
> insert the value to that new table
> i have write a script as below:
> use test
> if exists (select * from dbo.sysobjects where id => object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable') => 1)
> drop table [dbo].[Titles]
> GO
> SELECT * INTO [dbo].[Titles]
> FROM [other_table].[dbo].[Titles]
> GO
> Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
> GO
> it work fine if it use one database only but my server have 20
> databases, and all the database would like to have that modification.
> So is there any method to automatically do the modification using a
> script?
> i really cant figure it out, i hope someone have give me a help
> thanks you very much.
>|||thanks you Russell
i dont know how to write as the example is all in one statment only.
but i have write a new one using variable but the error is that ' use
@.db_name' is not correct syntax
is anyone how to fix it ?
Declare @.db_count int
Declare @.db_name varchar(100)
Declare @.start int
/* start at 7 which are user databases*/
Set @.start = 7
Set @.db_count = 0
Select @.db_count = count(*)
>From sys.sysdatabases
Where dbid >= @.start
While @.db_count > 0
Begin
Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
/* avoid delete the table in database test2 as it need use as
template for copy */
If @.db_name <> 'test2'
Begin
use @.db_name
if exists (select * from dbo.sysobjects where id =object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
End
Set @.db_count = @.db_count - 1
Set @.start = @.start + 1
End|||NEMA,
The ? substitutes the database name. So, you could do the following I
believe. (I tested a similar script, but I don't actually want to create
these tables on my server.)
exec sp_MSforeachdb
'USE ?
if DB_ID() > = 7
BEGIN
if exists (select * from dbo.sysobjects where id =object_id(N''[dbo].[customer]'') and OBJECTPROPERTY(id, N''IsUserTable'')
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
END'
Or you could use your code, but turn the block of SQL above into Dynamic SQL
(which is what sp_MSForEachDB does) and EXECUTE the prepared strings of SQL.
A good reference is:
http://www.sommarskog.se/dynamic_sql.html
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185469482.519284.216740@.x40g2000prg.googlegroups.com...
> thanks you Russell
> i dont know how to write as the example is all in one statment only.
> but i have write a new one using variable but the error is that ' use
> @.db_name' is not correct syntax
> is anyone how to fix it ?
> Declare @.db_count int
> Declare @.db_name varchar(100)
> Declare @.start int
> /* start at 7 which are user databases*/
> Set @.start = 7
> Set @.db_count = 0
> Select @.db_count = count(*)
>>From sys.sysdatabases
> Where dbid >= @.start
> While @.db_count > 0
> Begin
> Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
> /* avoid delete the table in database test2 as it need use as
> template for copy */
> If @.db_name <> 'test2'
> Begin
> use @.db_name
> if exists (select * from dbo.sysobjects where id => object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTable')
> = 1)
> drop table [dbo].[customer]
> SELECT * INTO [dbo].[customer]
> FROM [test2].[dbo].[customer]
> End
> Set @.db_count = @.db_count - 1
> Set @.start = @.start + 1
> End
>

about a SQL script

Dear All,
i recently would like to drop a table, then create a new one and then
insert the value to that new table
i have write a script as below:
use test
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[Titles]
GO
SELECT * INTO [dbo].[Titles]
FROM [other_table].[dbo].[Titles]
GO
Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
GO
it work fine if it use one database only but my server have 20
databases, and all the database would like to have that modification.
So is there any method to automatically do the modification using a
script?
i really cant figure it out, i hope someone have give me a help
thanks you very much.
NEMA,
You could use sp_MSForEachdb (an undocumented stored procedure) as described
at:
http://www.mssqlcity.com/Articles/Undoc/SQL2000UndocSP.htm
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185463821.216208.166530@.z24g2000prh.googlegr oups.com...
> Dear All,
> i recently would like to drop a table, then create a new one and then
> insert the value to that new table
> i have write a script as below:
> use test
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable') =
> 1)
> drop table [dbo].[Titles]
> GO
> SELECT * INTO [dbo].[Titles]
> FROM [other_table].[dbo].[Titles]
> GO
> Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
> GO
> it work fine if it use one database only but my server have 20
> databases, and all the database would like to have that modification.
> So is there any method to automatically do the modification using a
> script?
> i really cant figure it out, i hope someone have give me a help
> thanks you very much.
>
|||thanks you Russell
i dont know how to write as the example is all in one statment only.
but i have write a new one using variable but the error is that ' use
@.db_name' is not correct syntax
is anyone how to fix it ?
Declare @.db_count int
Declare @.db_name varchar(100)
Declare @.start int
/* start at 7 which are user databases*/
Set @.start = 7
Set @.db_count = 0
Select @.db_count = count(*)
>From sys.sysdatabases
Where dbid >= @.start
While @.db_count > 0
Begin
Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
/* avoid delete the table in database test2 as it need use as
template for copy */
If @.db_name <> 'test2'
Begin
use @.db_name
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
End
Set @.db_count = @.db_count - 1
Set @.start = @.start + 1
End
|||NEMA,
The ? substitutes the database name. So, you could do the following I
believe. (I tested a similar script, but I don't actually want to create
these tables on my server.)
exec sp_MSforeachdb
'USE ?
if DB_ID() > = 7
BEGIN
if exists (select * from dbo.sysobjects where id =
object_id(N''[dbo].[customer]'') and OBJECTPROPERTY(id, N''IsUserTable'')
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
END'
Or you could use your code, but turn the block of SQL above into Dynamic SQL
(which is what sp_MSForEachDB does) and EXECUTE the prepared strings of SQL.
A good reference is:
http://www.sommarskog.se/dynamic_sql.html
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185469482.519284.216740@.x40g2000prg.googlegr oups.com...
> thanks you Russell
> i dont know how to write as the example is all in one statment only.
> but i have write a new one using variable but the error is that ' use
> @.db_name' is not correct syntax
> is anyone how to fix it ?
> Declare @.db_count int
> Declare @.db_name varchar(100)
> Declare @.start int
> /* start at 7 which are user databases*/
> Set @.start = 7
> Set @.db_count = 0
> Select @.db_count = count(*)
> Where dbid >= @.start
> While @.db_count > 0
> Begin
> Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
> /* avoid delete the table in database test2 as it need use as
> template for copy */
> If @.db_name <> 'test2'
> Begin
> use @.db_name
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTable')
> = 1)
> drop table [dbo].[customer]
> SELECT * INTO [dbo].[customer]
> FROM [test2].[dbo].[customer]
> End
> Set @.db_count = @.db_count - 1
> Set @.start = @.start + 1
> End
>

about a SQL script

Dear All,
i recently would like to drop a table, then create a new one and then
insert the value to that new table
i have write a script as below:
use test
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable')
=
1)
drop table [dbo].[Titles]
GO
SELECT * INTO [dbo].[Titles]
FROM [other_table].[dbo].[Titles]
GO
Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
GO
it work fine if it use one database only but my server have 20
databases, and all the database would like to have that modification.
So is there any method to automatically do the modification using a
script?
i really cant figure it out, i hope someone have give me a help
thanks you very much.NEMA,
You could use sp_MSForEachdb (an undocumented stored procedure) as described
at:
http://www.mssqlcity.com/Articles/U...2000UndocSP.htm
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185463821.216208.166530@.z24g2000prh.googlegroups.com...
> Dear All,
> i recently would like to drop a table, then create a new one and then
> insert the value to that new table
> i have write a script as below:
> use test
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[Titles]') and OBJECTPROPERTY(id, N'IsUserTable'
) =
> 1)
> drop table [dbo].[Titles]
> GO
> SELECT * INTO [dbo].[Titles]
> FROM [other_table].[dbo].[Titles]
> GO
> Insert TABLE [dbo].[Titles] (name, id) Values ( 'good book',1)
> GO
> it work fine if it use one database only but my server have 20
> databases, and all the database would like to have that modification.
> So is there any method to automatically do the modification using a
> script?
> i really cant figure it out, i hope someone have give me a help
> thanks you very much.
>|||thanks you Russell
i dont know how to write as the example is all in one statment only.
but i have write a new one using variable but the error is that ' use
@.db_name' is not correct syntax
is anyone how to fix it ?
Declare @.db_count int
Declare @.db_name varchar(100)
Declare @.start int
/* start at 7 which are user databases*/
Set @.start = 7
Set @.db_count = 0
Select @.db_count = count(*)
>From sys.sysdatabases
Where dbid >= @.start
While @.db_count > 0
Begin
Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
/* avoid delete the table in database test2 as it need use as
template for copy */
If @.db_name <> 'test2'
Begin
use @.db_name
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTable'
)
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
End
Set @.db_count = @.db_count - 1
Set @.start = @.start + 1
End|||NEMA,
The ? substitutes the database name. So, you could do the following I
believe. (I tested a similar script, but I don't actually want to create
these tables on my server.)
exec sp_MSforeachdb
'USE ?
if DB_ID() > = 7
BEGIN
if exists (select * from dbo.sysobjects where id =
object_id(N''[dbo].[customer]'') and OBJECTPROPERTY(id, N''IsUserTab
le'')
= 1)
drop table [dbo].[customer]
SELECT * INTO [dbo].[customer]
FROM [test2].[dbo].[customer]
END'
Or you could use your code, but turn the block of SQL above into Dynamic SQL
(which is what sp_MSForEachDB does) and EXECUTE the prepared strings of SQL.
A good reference is:
http://www.sommarskog.se/dynamic_sql.html
RLF
"NEMA" <realjacky@.gmail.com> wrote in message
news:1185469482.519284.216740@.x40g2000prg.googlegroups.com...
> thanks you Russell
> i dont know how to write as the example is all in one statment only.
> but i have write a new one using variable but the error is that ' use
> @.db_name' is not correct syntax
> is anyone how to fix it ?
> Declare @.db_count int
> Declare @.db_name varchar(100)
> Declare @.start int
> /* start at 7 which are user databases*/
> Set @.start = 7
> Set @.db_count = 0
> Select @.db_count = count(*)
> Where dbid >= @.start
> While @.db_count > 0
> Begin
> Select @.db_name = [name] From sys.sysdatabases Where dbid = @.start
> /* avoid delete the table in database test2 as it need use as
> template for copy */
> If @.db_name <> 'test2'
> Begin
> use @.db_name
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[customer]') and OBJECTPROPERTY(id, N'IsUserTabl
e')
> = 1)
> drop table [dbo].[customer]
> SELECT * INTO [dbo].[customer]
> FROM [test2].[dbo].[customer]
> End
> Set @.db_count = @.db_count - 1
> Set @.start = @.start + 1
> End
>sql

About a RS version and previous conditions of use

I own a Windows Small Bussiness 2003 license which includes SQL server 2000
Standard Edition and additionally came with a version of Reporting Services.
I want to learn and use it (Reporting Services) as a beginner but when I
try to install it a message appears indicating that I need to install or
configure previously two products:
a) Visual Studio .Net 2003
b) IIS 5.0
Do I need both of 'em just to begin doing simple reports?
I supposed a simple use like I could obtain through Crystal reports 7.0 or
so on.
Please, help me.
Probably next year we will migrate to a new version of Microsoft SBS
Is it worth to do efforts with the versions I own nowadays or not?
Thanks alot in advance.
--
sanpetusRS 2000 report designer require some copy of VS 2003 to be installed. In the
past VB.net 2003 was the cheapest way to do this (about $100). I don't know
now. Note that the VB 2005 will not work for this.
In RS 2005 it comes with a version of VS 2005 so no additional purchase is
necessary.
RS is a asp.net application and as such it needs IIS. IIS comes with all
servers. It might need to configured though.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"sanpetus" <sanpetus@.discussions.microsoft.com> wrote in message
news:14FE57B4-A059-4B0F-8539-C9D64CBAA6B6@.microsoft.com...
>I own a Windows Small Bussiness 2003 license which includes SQL server 2000
> Standard Edition and additionally came with a version of Reporting
> Services.
> I want to learn and use it (Reporting Services) as a beginner but when I
> try to install it a message appears indicating that I need to install or
> configure previously two products:
> a) Visual Studio .Net 2003
> b) IIS 5.0
> Do I need both of 'em just to begin doing simple reports?
> I supposed a simple use like I could obtain through Crystal reports 7.0 or
> so on.
> Please, help me.
> Probably next year we will migrate to a new version of Microsoft SBS
> Is it worth to do efforts with the versions I own nowadays or not?
> Thanks alot in advance.
> --
> sanpetus

About a Free MSDE manager

Hello!!
Can you advice me some free MSDE tools (like database manager, query
interface...) that can be found over web?
Thanks in advance for your help!!
Ambros Moreno
From Almeria (Spain)
http://www.aspfaq.com/2442
http://www.aspfaq.com/
(Reverse address to reply.)
"Ambros" <ambros@.sasao.com> wrote in message
news:Obexjnf1EHA.2804@.TK2MSFTNGP15.phx.gbl...
> Hello!!
> Can you advice me some free MSDE tools (like database manager, query
> interface...) that can be found over web?
> Thanks in advance for your help!!
> Ambros Moreno
> From Almeria (Spain)
>
|||Thanks for the link Aaron!! is really usefull.!!
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> escribi en el mensaje
news:eOwVYai1EHA.2156@.TK2MSFTNGP10.phx.gbl...
> http://www.aspfaq.com/2442
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "Ambros" <ambros@.sasao.com> wrote in message
> news:Obexjnf1EHA.2804@.TK2MSFTNGP15.phx.gbl...
>

About a DataType

What kind of Datatype can I use in my DB to store info like a letter or Rich
Text, including the formats?
thks
--Depending on the expected length including RTF codes, you can either use any
of
the character types (Char, VarChar, NChar, NVarChar, Text or NText).
Thomas
"Kenny M." <KennyM@.discussions.microsoft.com> wrote in message
news:9A7D59EE-EF4C-4F01-B661-9A6C5F0413D8@.microsoft.com...
> What kind of Datatype can I use in my DB to store info like a letter or Ri
ch
> Text, including the formats?
> thks
> --
>|||If the documents size can exceed 8k, Use Image type. If all docs are
guaranteed to be less than 8k you cann use Binary...
"Kenny M." wrote:

> What kind of Datatype can I use in my DB to store info like a letter or Ri
ch
> Text, including the formats?
> thks
> --
>

about 8KB limit

In SQL2005 with the option ROW_OVERFLOW_DATA the restriction of 8KB by row relaxed for tables that contain varchar, nvarchar, varbinary, sql_variant, or CLR user-defined type columns. In this case SQL Server use as best the page size, however I wonder what happen when this option is turned off.

For example, If a row size is of 3 KB and I have ROW_OVERFLOW_DATA OFF how SQL Server store my rows? there are about 2 KB of wasted space by page?

There is no such thing called ROW_OVERFLOW_DATA option. You cannot turn it on or off. It is based on the column type. If you have variable length columns, sql server allows you to store rows larger than 8k by pushing variable length column values off-row.

If your row size is 3KB fixed size, you will waste 2KB in each page. There is no way to work around and re-use those 2KB space.

Thanks

Sherry

about 8KB limit

In SQL2005 with the option ROW_OVERFLOW_DATA the restriction of 8KB by row relaxed for tables that contain varchar, nvarchar, varbinary, sql_variant, or CLR user-defined type columns. In this case SQL Server use as best the page size, however I wonder what happen when this option is turned off.

For example, If a row size is of 3 KB and I have ROW_OVERFLOW_DATA OFF how SQL Server store my rows? there are about 2 KB of wasted space by page?

There is no such thing called ROW_OVERFLOW_DATA option. You cannot turn it on or off. It is based on the column type. If you have variable length columns, sql server allows you to store rows larger than 8k by pushing variable length column values off-row.

If your row size is 3KB fixed size, you will waste 2KB in each page. There is no way to work around and re-use those 2KB space.

Thanks

Sherry

sql

about 32 bit application and odbc to access 64 bit SQL Server 2005

Hello
Our application currently is running on IIS machine with Windows 2003 32 bit
OS installed and database server machine with Windows 2000 32 bit OS and SQL
server 2000 installed.
We are thinking to upgrade the database server to Windows 2003 64 bit OS and
SQL server 2005 64 bit.
The IIS machine is still on 32 bit OS and application, We are wondering if
there is any problem for 32 bit application and ODBC to access the 64 bit
database?
Thanks in advance
Lionel
No, there is no problem. I least I have seen dozens of similar applications
accesing 64-bit databases.
Most of the connectivity issues I have seen is connecting SQL Server 64-bit
to Oracle but there is always a solution.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"lionel" wrote:

> Hello
> Our application currently is running on IIS machine with Windows 2003 32 bit
> OS installed and database server machine with Windows 2000 32 bit OS and SQL
> server 2000 installed.
> We are thinking to upgrade the database server to Windows 2003 64 bit OS and
> SQL server 2005 64 bit.
> The IIS machine is still on 32 bit OS and application, We are wondering if
> there is any problem for 32 bit application and ODBC to access the 64 bit
> database?
> Thanks in advance
> Lionel
|||Lionel,
Here is a nice article on migrating to 64 bit SQL Server and the drivers it
takes to connect.
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1241693,00.html
The only issue when using a 64 bit OS that I have noticed is on the Jet
(Access) connector which doesnt exist on 64 bit.
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.techintsolutions.com
*/
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:EF862D05-83A0-4F45-A0DE-D12F696E7EE8@.microsoft.com...[vbcol=seagreen]
> No, there is no problem. I least I have seen dozens of similar
> applications
> accesing 64-bit databases.
> Most of the connectivity issues I have seen is connecting SQL Server
> 64-bit
> to Oracle but there is always a solution.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "lionel" wrote:

Tuesday, March 27, 2012

about 32 bit application and odbc to access 64 bit SQL Server 2005

Hello
Our application currently is running on IIS machine with Windows 2003 32 bit
OS installed and database server machine with Windows 2000 32 bit OS and SQL
server 2000 installed.
We are thinking to upgrade the database server to Windows 2003 64 bit OS and
SQL server 2005 64 bit.
The IIS machine is still on 32 bit OS and application, We are wondering if
there is any problem for 32 bit application and ODBC to access the 64 bit
database?
Thanks in advance
LionelNo, there is no problem. I least I have seen dozens of similar applications
accesing 64-bit databases.
Most of the connectivity issues I have seen is connecting SQL Server 64-bit
to Oracle but there is always a solution.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"lionel" wrote:

> Hello
> Our application currently is running on IIS machine with Windows 2003 32 b
it
> OS installed and database server machine with Windows 2000 32 bit OS and S
QL
> server 2000 installed.
> We are thinking to upgrade the database server to Windows 2003 64 bit OS a
nd
> SQL server 2005 64 bit.
> The IIS machine is still on 32 bit OS and application, We are wondering if
> there is any problem for 32 bit application and ODBC to access the 64 bit
> database?
> Thanks in advance
> Lionel|||Lionel,
Here is a nice article on migrating to 64 bit SQL Server and the drivers it
takes to connect.
http://searchsqlserver.techtarget.c...1241693,00.html
The only issue when using a 64 bit OS that I have noticed is on the Jet
(Access) connector which doesnt exist on 64 bit.
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.techintsolutions.com
*/
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:EF862D05-83A0-4F45-A0DE-D12F696E7EE8@.microsoft.com...[vbcol=seagreen]
> No, there is no problem. I least I have seen dozens of similar
> applications
> accesing 64-bit databases.
> Most of the connectivity issues I have seen is connecting SQL Server
> 64-bit
> to Oracle but there is always a solution.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "lionel" wrote:
>

about 32 bit application and odbc to access 64 bit SQL Server 2005

Hello
Our application currently is running on IIS machine with Windows 2003 32 bit
OS installed and database server machine with Windows 2000 32 bit OS and SQL
server 2000 installed.
We are thinking to upgrade the database server to Windows 2003 64 bit OS and
SQL server 2005 64 bit.
The IIS machine is still on 32 bit OS and application, We are wondering if
there is any problem for 32 bit application and ODBC to access the 64 bit
database?
Thanks in advance
LionelNo, there is no problem. I least I have seen dozens of similar applications
accesing 64-bit databases.
Most of the connectivity issues I have seen is connecting SQL Server 64-bit
to Oracle but there is always a solution.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"lionel" wrote:
> Hello
> Our application currently is running on IIS machine with Windows 2003 32 bit
> OS installed and database server machine with Windows 2000 32 bit OS and SQL
> server 2000 installed.
> We are thinking to upgrade the database server to Windows 2003 64 bit OS and
> SQL server 2005 64 bit.
> The IIS machine is still on 32 bit OS and application, We are wondering if
> there is any problem for 32 bit application and ODBC to access the 64 bit
> database?
> Thanks in advance
> Lionel|||Lionel,
Here is a nice article on migrating to 64 bit SQL Server and the drivers it
takes to connect.
http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1241693,00.html
The only issue when using a 64 bit OS that I have noticed is on the Jet
(Access) connector which doesnt exist on 64 bit.
--
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.techintsolutions.com
*/
"Ben Nevarez" <BenNevarez@.discussions.microsoft.com> wrote in message
news:EF862D05-83A0-4F45-A0DE-D12F696E7EE8@.microsoft.com...
> No, there is no problem. I least I have seen dozens of similar
> applications
> accesing 64-bit databases.
> Most of the connectivity issues I have seen is connecting SQL Server
> 64-bit
> to Oracle but there is always a solution.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
> AIG SunAmerica
>
> "lionel" wrote:
>> Hello
>> Our application currently is running on IIS machine with Windows 2003 32
>> bit
>> OS installed and database server machine with Windows 2000 32 bit OS and
>> SQL
>> server 2000 installed.
>> We are thinking to upgrade the database server to Windows 2003 64 bit OS
>> and
>> SQL server 2005 64 bit.
>> The IIS machine is still on 32 bit OS and application, We are wondering
>> if
>> there is any problem for 32 bit application and ODBC to access the 64 bit
>> database?
>> Thanks in advance
>> Lionel

About @@ERROR in SQL 2005 online book

Here

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

it is explained that @.@.ERROR will be cleared and reset.

But here:

http://msdn2.microsoft.com/en-us/library/ms190248.aspx

http://msdn2.microsoft.com/en-us/library/ms187009.aspx

we still see:

IF (@.@.ERROR <> 0)

SET @.ErrorSave = @.@.ERROR

Chester

Is there a question here?

I assume you are asking if @.@.Error is reset during the IF statement. If you read the first link, it says NO.

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

@.@.Error is reset by the next TSQL command. IF is a conditional statement and does not reset the flag.|||

Hi Chester,

The second example is indeed incorrect as @.@.error will be reset to 0 by the IF statement. The local @.ErrorSave should be set after each statement and them compared:

declare @.a int, @.ErrorSave int;

set @.a = (1 / 0); -- divide by zero

set @.ErrorSave = @.@.ERROR;

if (@.ErrorSave <> 0)
begin
select @.ErrorSave AS [ErrorNumber]
end

Cheers,
Rob

|||

Hi Tom,

That's sort of incorrect - the IF will return TRUE when evaluating the statement "IF (@.@.EROR <> 0)", however @.@.ERROR is then reset by the successful completion of the evaluation:

declare @.a int, @.ErrorSave int;

set @.a = (1 / 0); -- divide by zero

if (@.@.error <> 0)
begin
select @.@.error AS [ErrorNumber] -- will return 0
end

Cheers,
Rob

|||

Here

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

It says exactly:

Conditional statements, such as the IF statement, reset @.@.ERROR. If you reference @.@.ERROR in an IF statement, references to @.@.ERROR in the IF or ELSE blocks will not retrieve the @.@.ERROR information. In the following example, @.@.ERROR is reset by IF and does not return the error number when referenced in the PRINT statement.

|||

Thanks, Robert.

Actually I found this problem in one of our partner's application that was wriiten by a local Robert.

When I checked the online book, it was misleading at first .

Chester

|||Yep, you are right, my mistake.

@.@.Error is reset by the IF. The best thing to do is: SET @.errorcode = @.@.ERROR right after the command.

The @.@.Error traps so little errors, it is almost worthless. Most of the time the error in the command just terminates the stored proc and never gets to the error trap anyway, unless you use Try/Catch.

About @@ERROR in SQL 2005 online book

Here

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

it is explained that @.@.ERROR will be cleared and reset.

But here:

http://msdn2.microsoft.com/en-us/library/ms190248.aspx

http://msdn2.microsoft.com/en-us/library/ms187009.aspx

we still see:

IF (@.@.ERROR <> 0)

SET @.ErrorSave = @.@.ERROR

Chester

Is there a question here?

I assume you are asking if @.@.Error is reset during the IF statement. If you read the first link, it says NO.

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

@.@.Error is reset by the next TSQL command. IF is a conditional statement and does not reset the flag.|||

Hi Chester,

The second example is indeed incorrect as @.@.error will be reset to 0 by the IF statement. The local @.ErrorSave should be set after each statement and them compared:

declare @.a int, @.ErrorSave int;

set @.a = (1 / 0); -- divide by zero

set @.ErrorSave = @.@.ERROR;

if (@.ErrorSave <> 0)
begin
select @.ErrorSave AS [ErrorNumber]
end

Cheers,
Rob

|||

Hi Tom,

That's sort of incorrect - the IF will return TRUE when evaluating the statement "IF (@.@.EROR <> 0)", however @.@.ERROR is then reset by the successful completion of the evaluation:

declare @.a int, @.ErrorSave int;

set @.a = (1 / 0); -- divide by zero

if (@.@.error <> 0)
begin
select @.@.error AS [ErrorNumber] -- will return 0
end

Cheers,
Rob

|||

Here

http://msdn2.microsoft.com/en-us/library/ms190193.aspx

It says exactly:

Conditional statements, such as the IF statement, reset @.@.ERROR. If you reference @.@.ERROR in an IF statement, references to @.@.ERROR in the IF or ELSE blocks will not retrieve the @.@.ERROR information. In the following example, @.@.ERROR is reset by IF and does not return the error number when referenced in the PRINT statement.

|||

Thanks, Robert.

Actually I found this problem in one of our partner's application that was wriiten by a local Robert.

When I checked the online book, it was misleading at first .

Chester

|||Yep, you are right, my mistake.

@.@.Error is reset by the IF. The best thing to do is: SET @.errorcode = @.@.ERROR right after the command.

The @.@.Error traps so little errors, it is almost worthless. Most of the time the error in the command just terminates the stored proc and never gets to the error trap anyway, unless you use Try/Catch.sql

About @@ERROR

Hi,
Can I use @.@.ERROR global variable to check the error returned by SQL DDL
commands.Are you saying that it doesn't work? Can you elaborate on your question? Som
e error will terminate
the batch. I suggest you check the two articles on error handling here: http://www
.sommarskog.se/
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Shri.DBA" <ShriDBA@.discussions.microsoft.com> wrote in message
news:4CC53AC2-1747-4C8F-851B-2D057A2487E7@.microsoft.com...
> Hi,
> Can I use @.@.ERROR global variable to check the error returned by SQL DDL
> commands.
>|||IN addition to Tibor's comments, and you will find included in Erlands
articles.
Yes you can ( and should) use @.@.error to check DDL... You might also check
for existence of the object or column, etc..
The problem is that some errors cause the entire batch, or maybe just the
statement to abort, in which case, the rest of your code wouldn't run or
@.@.error might not be set appropriately..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Shri.DBA" <ShriDBA@.discussions.microsoft.com> wrote in message
news:4CC53AC2-1747-4C8F-851B-2D057A2487E7@.microsoft.com...
> Hi,
> Can I use @.@.ERROR global variable to check the error returned by SQL DDL
> commands.
>