Tuesday, March 27, 2012
does SQL have an escape character
-- George Hester
__________________________________It seems like you both replace every quote with two quotes and then use a parameter object which
does exactly the same. This is why you get double. You should only need to use the parameter object.
If you post the code (either here or on ASP group) you might get some help...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
In a asp I made using the Paramater object a user can submit a form and the data will be inserted in
the database. But if the user submits a name in the form O'Reilly then it will error. So I made a
VBScript function which parses the input data and if ' exists in the name I add an extra ' to the '
in the form data and the user can insert the data. Trouble is when I return the recordset it looks
like this O''Reilly. So I am wondering if there exists an escape chatacter to avoid this issue?
Thanks.
--
George Hester
__________________________________|||Here is a snippet:
<%
strCompanyName =3D EncodeString(Request.Form("txtCompanyName"))
If strCompanyName <> "" Then
If Len(strCompanyName) =3D 0 Then
'
blnErrorFound =3D True
End If
If Not blnErrorFound Then
Set cmd =3D Server.CreateObject("ADODB.Command")
Set pReturnCode =3D Server.CreateObject("ADODB.Parameter")
Set pCompanyNameDesc =3D Server.CreateObject("ADODB.Parameter")
With cmd
.CommandType =3D adCmdStoredProc
.CommandText =3D "AddSuppliers"
Set .ActiveConnection =3D cn
Set pCompanyNameDesc =3D .CreateParameter("CompanyNameDesc")
With pCompanyNameDesc
.Type =3D adVarWChar
.Size =3D 40
.Direction =3D adParamInput
.Value =3D strCompanyName
End With
.Parameters.Append pCompanyNameDesc
End With
With cn
.BeginTrans
With cmd
.Execute lRecs,, adCmdStoredProc + adExecuteNoRecords
End With
If Err.Number <> 0 Then
.RollbackTrans
Else
.CommitTrans
With cmd
If .Parameters("@.RETURN_CODE").Value =3D 0 Then
strMsg =3D "Company Name"
Response.Write strMsg
sSQL =3D "SELECT * FROM Suppliers ORDER BY SupplierID DESC"
Set rs =3D Server.CreateObject("ADODB.Recordset")
With rs
.CursorType =3D adOpenForwardOnly
.LockType =3D adLockReadOnly
.Open sSQL, cn
Response.Write(.Fields("CompanyName").Value)
End If
End With
End If
End With
End If
End If
%>
I send to strCompanyName the value in a Text Box in a form. The =EncodeString just replaces occurances of '
with '' so that the rs.Open sSQL, cn does not fail if the user entered =say O'Reilly. But the recordset returns
O''Reilly. Yes I can Replace() that out easy enough. I was hoping in =the sSQL string there was an escape in
SQL so that I didn't have to use EncodeString().
-- George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =use a parameter object which
> does exactly the same. This is why you get double. You should only =need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =help...
> > -- > Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> > > "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =chatacter to avoid this issue?
> Thanks.
> > -- > George Hester
> __________________________________
> >|||I'm sorry. I meant the cmd.Execute will error if I don't replace the ' =in O'Reilly with O''Reilly inserting in the database. I believe.
-- George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =use a parameter object which
> does exactly the same. This is why you get double. You should only =need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =help...
> > -- > Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> > > "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =chatacter to avoid this issue?
> Thanks.
> > -- > George Hester
> __________________________________
> >|||The ADO command and parameter handling should replace each ' with '' for you. I suggest you run a profiler
trace and see what happens.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message news:ed2G5u8XEHA.1152@.TK2MSFTNGP09.phx.gbl...
I'm sorry. I meant the cmd.Execute will error if I don't replace the ' in O'Reilly with O''Reilly inserting
in the database. I believe.
--
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then use a parameter object which
> does exactly the same. This is why you get double. You should only need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some help...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape chatacter to avoid this issue?
> Thanks.
> --
> George Hester
> __________________________________
>
does SQL have an escape character
the data will be inserted in the database. But if the user submits a =
name in the form O'Reilly then it will error. So I made a VBScript =
function which parses the input data and if ' exists in the name I add =
an extra ' to the ' in the form data and the user can insert the data. =
Trouble is when I return the recordset it looks like this O''Reilly. So =
I am wondering if there exists an escape chatacter to avoid this issue? =
Thanks.
--=20
George Hester
__________________________________
It seems like you both replace every quote with two quotes and then use a parameter object which
does exactly the same. This is why you get double. You should only need to use the parameter object.
If you post the code (either here or on ASP group) you might get some help...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
In a asp I made using the Paramater object a user can submit a form and the data will be inserted in
the database. But if the user submits a name in the form O'Reilly then it will error. So I made a
VBScript function which parses the input data and if ' exists in the name I add an extra ' to the '
in the form data and the user can insert the data. Trouble is when I return the recordset it looks
like this O''Reilly. So I am wondering if there exists an escape chatacter to avoid this issue?
Thanks.
George Hester
__________________________________
|||Here is a snippet:
<%
strCompanyName =3D EncodeString(Request.Form("txtCompanyName"))
If strCompanyName <> "" Then
If Len(strCompanyName) =3D 0 Then
'
blnErrorFound =3D True
End If
If Not blnErrorFound Then
Set cmd =3D Server.CreateObject("ADODB.Command")
Set pReturnCode =3D Server.CreateObject("ADODB.Parameter")
Set pCompanyNameDesc =3D Server.CreateObject("ADODB.Parameter")
With cmd
.CommandType =3D adCmdStoredProc
.CommandText =3D "AddSuppliers"
Set .ActiveConnection =3D cn
Set pCompanyNameDesc =3D .CreateParameter("CompanyNameDesc")
With pCompanyNameDesc
.Type =3D adVarWChar
.Size =3D 40
.Direction =3D adParamInput
.Value =3D strCompanyName
End With
.Parameters.Append pCompanyNameDesc
End With
With cn
.BeginTrans
With cmd
.Execute lRecs,, adCmdStoredProc + adExecuteNoRecords
End With
If Err.Number <> 0 Then
.RollbackTrans
Else
.CommitTrans
With cmd
If .Parameters("@.RETURN_CODE").Value =3D 0 Then
strMsg =3D "Company Name"
Response.Write strMsg
sSQL =3D "SELECT * FROM Suppliers ORDER BY SupplierID DESC"
Set rs =3D Server.CreateObject("ADODB.Recordset")
With rs
.CursorType =3D adOpenForwardOnly
.LockType =3D adLockReadOnly
.Open sSQL, cn
Response.Write(.Fields("CompanyName").Value)
End If
End With
End If
End With
End If
End If
%>
I send to strCompanyName the value in a Text Box in a form. The =
EncodeString just replaces occurances of '
with '' so that the rs.Open sSQL, cn does not fail if the user entered =
say O'Reilly. But the recordset returns
O''Reilly. Yes I can Replace() that out easy enough. I was hoping in =
the sSQL string there was an escape in
SQL so that I didn't have to use EncodeString().
--=20
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =
in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =
use a parameter object which
> does exactly the same. This is why you get double. You should only =
need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =
help...
>=20
> --=20
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>=20
>=20
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =
and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =
then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =
name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =
return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =
chatacter to avoid this issue?
> Thanks.
>=20
> --=20
> George Hester
> __________________________________
>=20
>
|||I'm sorry. I meant the cmd.Execute will error if I don't replace the ' =
in O'Reilly with O''Reilly inserting in the database. I believe.
--=20
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =
in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =
use a parameter object which
> does exactly the same. This is why you get double. You should only =
need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =
help...
>=20
> --=20
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>=20
>=20
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =
and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =
then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =
name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =
return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =
chatacter to avoid this issue?
> Thanks.
>=20
> --=20
> George Hester
> __________________________________
>=20
>
|||The ADO command and parameter handling should replace each ' with '' for you. I suggest you run a profiler
trace and see what happens.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message news:ed2G5u8XEHA.1152@.TK2MSFTNGP09.phx.gbl...
I'm sorry. I meant the cmd.Execute will error if I don't replace the ' in O'Reilly with O''Reilly inserting
in the database. I believe.
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then use a parameter object which
> does exactly the same. This is why you get double. You should only need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some help...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape chatacter to avoid this issue?
> Thanks.
> --
> George Hester
> __________________________________
>
does SQL have an escape character
the data will be inserted in the database. But if the user submits a =
name in the form O'Reilly then it will error. So I made a VBScript =
function which parses the input data and if ' exists in the name I add =
an extra ' to the ' in the form data and the user can insert the data. =
Trouble is when I return the recordset it looks like this O''Reilly. So =
I am wondering if there exists an escape chatacter to avoid this issue? =
Thanks.
--=20
George Hester
__________________________________It seems like you both replace every quote with two quotes and then use a pa
rameter object which
does exactly the same. This is why you get double. You should only need to u
se the parameter object.
If you post the code (either here or on ASP group) you might get some help..
.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
In a asp I made using the Paramater object a user can submit a form and the
data will be inserted in
the database. But if the user submits a name in the form O'Reilly then it w
ill error. So I made a
VBScript function which parses the input data and if ' exists in the name I
add an extra ' to the '
in the form data and the user can insert the data. Trouble is when I return
the recordset it looks
like this O''Reilly. So I am wondering if there exists an escape chatacter
to avoid this issue?
Thanks.
George Hester
__________________________________|||Here is a snippet:
<%
strCompanyName =3D EncodeString(Request.Form("txtCompanyName"))
If strCompanyName <> "" Then
If Len(strCompanyName) =3D 0 Then
'
blnErrorFound =3D True
End If
If Not blnErrorFound Then
Set cmd =3D Server.CreateObject("ADODB.Command")
Set pReturnCode =3D Server.CreateObject("ADODB.Parameter")
Set pCompanyNameDesc =3D Server.CreateObject("ADODB.Parameter")
With cmd
.CommandType =3D adCmdStoredProc
.CommandText =3D "AddSuppliers"
Set .ActiveConnection =3D cn
Set pCompanyNameDesc =3D .CreateParameter("CompanyNameDesc")
With pCompanyNameDesc
.Type =3D adVarWChar
.Size =3D 40
.Direction =3D adParamInput
.Value =3D strCompanyName
End With
.Parameters.Append pCompanyNameDesc
End With
With cn
.BeginTrans
With cmd
.Execute lRecs,, adCmdStoredProc + adExecuteNoRecords
End With
If Err.Number <> 0 Then
.RollbackTrans
Else
.CommitTrans
With cmd
If .Parameters("@.RETURN_CODE").Value =3D 0 Then
strMsg =3D "Company Name"
Response.Write strMsg
sSQL =3D "SELECT * FROM Suppliers ORDER BY SupplierID DESC"
Set rs =3D Server.CreateObject("ADODB.Recordset")
With rs
.CursorType =3D adOpenForwardOnly
.LockType =3D adLockReadOnly
.Open sSQL, cn
Response.Write(.Fields("CompanyName").Value)
End If
End With
End If
End With
End If
End If
%>
I send to strCompanyName the value in a Text Box in a form. The =
EncodeString just replaces occurances of '
with '' so that the rs.Open sSQL, cn does not fail if the user entered =
say O'Reilly. But the recordset returns
O''Reilly. Yes I can Replace() that out easy enough. I was hoping in =
the sSQL string there was an escape in
SQL so that I didn't have to use EncodeString().
--=20
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =
in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =
use a parameter object which
> does exactly the same. This is why you get double. You should only =
need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =
help...
>=20
> --=20
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>=20
>=20
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =
and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =
then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =
name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =
return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =
chatacter to avoid this issue?
> Thanks.
>=20
> --=20
> George Hester
> __________________________________
>=20
>|||I'm sorry. I meant the cmd.Execute will error if I don't replace the ' =
in O'Reilly with O''Reilly inserting in the database. I believe.
--=20
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote =
in message news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then =
use a parameter object which
> does exactly the same. This is why you get double. You should only =
need to use the parameter object.
> If you post the code (either here or on ASP group) you might get some =
help...
>=20
> --=20
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>=20
>=20
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form =
and the data will be inserted in
> the database. But if the user submits a name in the form O'Reilly =
then it will error. So I made a
> VBScript function which parses the input data and if ' exists in the =
name I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I =
return the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape =
chatacter to avoid this issue?
> Thanks.
>=20
> --=20
> George Hester
> __________________________________
>=20
>|||The ADO command and parameter handling should replace each ' with '' for you
. I suggest you run a profiler
trace and see what happens.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"George Hester" <hesterloli@.hotmail.com> wrote in message news:ed2G5u8XEHA.1
152@.TK2MSFTNGP09.phx.gbl...
I'm sorry. I meant the cmd.Execute will error if I don't replace the ' in O
'Reilly with O''Reilly inserting
in the database. I believe.
George Hester
__________________________________
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message
news:u9qoKn0XEHA.3512@.TK2MSFTNGP12.phx.gbl...
> It seems like you both replace every quote with two quotes and then use a
parameter object which
> does exactly the same. This is why you get double. You should only need to
use the parameter object.
> If you post the code (either here or on ASP group) you might get some help
..
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "George Hester" <hesterloli@.hotmail.com> wrote in message
> news:elfsLX0XEHA.2388@.TK2MSFTNGP11.phx.gbl...
> In a asp I made using the Paramater object a user can submit a form and th
e data will be inserted in
> the database. But if the user submits a name in the form O'Reilly then it
will error. So I made a
> VBScript function which parses the input data and if ' exists in the name
I add an extra ' to the '
> in the form data and the user can insert the data. Trouble is when I retu
rn the recordset it looks
> like this O''Reilly. So I am wondering if there exists an escape chatacte
r to avoid this issue?
> Thanks.
> --
> George Hester
> __________________________________
>
Sunday, March 25, 2012
Does SQL Express suport SQL Agant?
hi
As you may know by default instalation SQL Agant node in
object browser in Management Studio is not shown or is disabled.
For me It is not shown.So I enabled OLE Automation in
Surface Area configuration.Even by doing this I can't find the SQL Agant service in
Control Panel\Administrative Tools\Services
so I want to know should I do any thing else or does SQL Express suport SQL Agant service at all?
thanks
SQL Server Agent is not included with SQL Express.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Sunday, February 26, 2012
does anyone have a query to check for db differences
are the same on the 2 dbs and give me differences with any
I know of 3rd party tools from Red-gate , but was hoping someone had written
a simple script that i could use
Thanks
Hassan
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
>
Simple script? Are you kidding? It is very compicated issue. Personally , I
use Red-gate and it does work pretty good
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>
|||One thing you could try is to script out all the objects from each database
into two separate folders (with the option of a separate file for each
object). And then compare the folders using a tool like WinDiff that comes
with Visual Studio.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>
|||I mean simple such as
select a.name from dbold..sysobjects a
where not exists (select * from dbnew.dbo.sysobjects b where a.name =b.name)
select a.name from dbold..sysindexes a
where not exists (select * from dbnew.dbo.sysindexes b where a.name =b.name)
Would this be fairly accurate if i want to capture everything ?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
> Hassan
> Simple script? Are you kidding? It is very compicated issue. Personally ,
I[vbcol=seagreen]
> use Red-gate and it does work pretty good
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
schema
>
|||I wasnt looking at all details such as text of sprocs, triggers, views,etc..
just the names of objects that are not present
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> One thing you could try is to script out all the objects from each
database[vbcol=seagreen]
> into two separate folders (with the option of a separate file for each
> object). And then compare the folders using a tool like WinDiff that comes
> with Visual Studio.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
schema
>
|||Hi
Well, I'd not query system tables , instead INFORMATION_SCHEMA view_name
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23xxItBnkFHA.2852@.TK2MSFTNGP15.phx.gbl...
>I mean simple such as
> select a.name from dbold..sysobjects a
> where not exists (select * from dbnew.dbo.sysobjects b where a.name
> =b.name)
>
> select a.name from dbold..sysindexes a
> where not exists (select * from dbnew.dbo.sysindexes b where a.name
> =b.name)
> Would this be fairly accurate if i want to capture everything ?
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
> I
> schema
>
|||Yes...you could smply do a left or full outer join between the two databases
to work out which ones are missing on each side.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u9iopHnkFHA.1440@.TK2MSFTNGP14.phx.gbl...
>I wasnt looking at all details such as text of sprocs, triggers,
>views,etc..
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> database
> schema
>
|||You can still do this by scripting the databases to seperate folders and
comparing them with a Diff tool. I have found that BeyondCompare works well,
but Windiff would work fine too. Whatever is on one side but not the other
is what is missing. I currently do this for a database with 375 tables and
450 Stored Procedures in an environment with 20 developers making changes
daily. The developers are supposed to be checking changes in through Visual
Source Safe, but often forget to do so. I catch the problems before they
become an issue and let the developers know that need to check their changes
in/out of VSS.
"Hassan" wrote:
> I wasnt looking at all details such as text of sprocs, triggers, views,etc..
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> database
> schema
>
>
|||This tool allows you to view all the db contents al logical level
as well as to query the oledb schemas. Might be of some help (free)
http://151.100.3.84/technicalpreview/
does anyone have a query to check for db differences
are the same on the 2 dbs and give me differences with any
I know of 3rd party tools from Red-gate , but was hoping someone had written
a simple script that i could use
ThanksHassan
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
>
Simple script? Are you kidding? It is very compicated issue. Personally , I
use Red-gate and it does work pretty good
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>|||One thing you could try is to script out all the objects from each database
into two separate folders (with the option of a separate file for each
object). And then compare the folders using a tool like WinDiff that comes
with Visual Studio.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>|||I mean simple such as
select a.name from dbold..sysobjects a
where not exists (select * from dbnew.dbo.sysobjects b where a.name =b.name)
select a.name from dbold..sysindexes a
where not exists (select * from dbnew.dbo.sysindexes b where a.name =b.name)
Would this be fairly accurate if i want to capture everything ?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
> Hassan
> Simple script? Are you kidding? It is very compicated issue. Personally ,
I
> use Red-gate and it does work pretty good
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
schema[vbcol=seagreen]
>|||I wasnt looking at all details such as text of sprocs, triggers, views,etc..
just the names of objects that are not present
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> One thing you could try is to script out all the objects from each
database
> into two separate folders (with the option of a separate file for each
> object). And then compare the folders using a tool like WinDiff that comes
> with Visual Studio.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
schema[vbcol=seagreen]
>|||Hi
Well, I'd not query system tables , instead INFORMATION_SCHEMA view_name
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23xxItBnkFHA.2852@.TK2MSFTNGP15.phx.gbl...
>I mean simple such as
> select a.name from dbold..sysobjects a
> where not exists (select * from dbnew.dbo.sysobjects b where a.name
> =b.name)
>
> select a.name from dbold..sysindexes a
> where not exists (select * from dbnew.dbo.sysindexes b where a.name
> =b.name)
> Would this be fairly accurate if i want to capture everything ?
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
> I
> schema
>|||Yes...you could smply do a left or full outer join between the two databases
to work out which ones are missing on each side.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u9iopHnkFHA.1440@.TK2MSFTNGP14.phx.gbl...
>I wasnt looking at all details such as text of sprocs, triggers,
>views,etc..
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> database
> schema
>|||You can still do this by scripting the databases to seperate folders and
comparing them with a Diff tool. I have found that BeyondCompare works well
,
but Windiff would work fine too. Whatever is on one side but not the other
is what is missing. I currently do this for a database with 375 tables and
450 Stored Procedures in an environment with 20 developers making changes
daily. The developers are supposed to be checking changes in through Visual
Source Safe, but often forget to do so. I catch the problems before they
become an issue and let the developers know that need to check their changes
in/out of VSS.
"Hassan" wrote:
> I wasnt looking at all details such as text of sprocs, triggers, views,etc
.
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> database
> schema
>
>|||This tool allows you to view all the db contents al logical level
as well as to query the oledb schemas. Might be of some help (free)
http://151.100.3.84/technicalpreview/
does anyone have a query to check for db differences
are the same on the 2 dbs and give me differences with any
I know of 3rd party tools from Red-gate , but was hoping someone had written
a simple script that i could use
ThanksHassan
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
>
Simple script? Are you kidding? It is very compicated issue. Personally , I
use Red-gate and it does work pretty good
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>|||One thing you could try is to script out all the objects from each database
into two separate folders (with the option of a separate file for each
object). And then compare the folders using a tool like WinDiff that comes
with Visual Studio.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>I would like to compare 2 dbs at an object level to ensure that all schema
> are the same on the 2 dbs and give me differences with any
> I know of 3rd party tools from Red-gate , but was hoping someone had
> written
> a simple script that i could use
> Thanks
>|||I mean simple such as
select a.name from dbold..sysobjects a
where not exists (select * from dbnew.dbo.sysobjects b where a.name =b.name)
select a.name from dbold..sysindexes a
where not exists (select * from dbnew.dbo.sysindexes b where a.name =b.name)
Would this be fairly accurate if i want to capture everything ?
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
> Hassan
> > I know of 3rd party tools from Red-gate , but was hoping someone had
> > written
> > a simple script that i could use
> >
> Simple script? Are you kidding? It is very compicated issue. Personally ,
I
> use Red-gate and it does work pretty good
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
> >I would like to compare 2 dbs at an object level to ensure that all
schema
> > are the same on the 2 dbs and give me differences with any
> >
> > I know of 3rd party tools from Red-gate , but was hoping someone had
> > written
> > a simple script that i could use
> >
> > Thanks
> >
> >
>|||I wasnt looking at all details such as text of sprocs, triggers, views,etc..
just the names of objects that are not present
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> One thing you could try is to script out all the objects from each
database
> into two separate folders (with the option of a separate file for each
> object). And then compare the folders using a tool like WinDiff that comes
> with Visual Studio.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
> >I would like to compare 2 dbs at an object level to ensure that all
schema
> > are the same on the 2 dbs and give me differences with any
> >
> > I know of 3rd party tools from Red-gate , but was hoping someone had
> > written
> > a simple script that i could use
> >
> > Thanks
> >
> >
>|||Hi
Well, I'd not query system tables , instead INFORMATION_SCHEMA view_name
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23xxItBnkFHA.2852@.TK2MSFTNGP15.phx.gbl...
>I mean simple such as
> select a.name from dbold..sysobjects a
> where not exists (select * from dbnew.dbo.sysobjects b where a.name
> =b.name)
>
> select a.name from dbold..sysindexes a
> where not exists (select * from dbnew.dbo.sysindexes b where a.name
> =b.name)
> Would this be fairly accurate if i want to capture everything ?
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O6fu%237mkFHA.3212@.TK2MSFTNGP10.phx.gbl...
>> Hassan
>> > I know of 3rd party tools from Red-gate , but was hoping someone had
>> > written
>> > a simple script that i could use
>> >
>> Simple script? Are you kidding? It is very compicated issue. Personally ,
> I
>> use Red-gate and it does work pretty good
>>
>> "Hassan" <fatima_ja@.hotmail.com> wrote in message
>> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>> >I would like to compare 2 dbs at an object level to ensure that all
> schema
>> > are the same on the 2 dbs and give me differences with any
>> >
>> > I know of 3rd party tools from Red-gate , but was hoping someone had
>> > written
>> > a simple script that i could use
>> >
>> > Thanks
>> >
>> >
>>
>|||Yes...you could smply do a left or full outer join between the two databases
to work out which ones are missing on each side.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u9iopHnkFHA.1440@.TK2MSFTNGP14.phx.gbl...
>I wasnt looking at all details such as text of sprocs, triggers,
>views,etc..
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
>> One thing you could try is to script out all the objects from each
> database
>> into two separate folders (with the option of a separate file for each
>> object). And then compare the folders using a tool like WinDiff that
>> comes
>> with Visual Studio.
>> --
>> HTH,
>> Vyas, MVP (SQL Server)
>> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>>
>> "Hassan" <fatima_ja@.hotmail.com> wrote in message
>> news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
>> >I would like to compare 2 dbs at an object level to ensure that all
> schema
>> > are the same on the 2 dbs and give me differences with any
>> >
>> > I know of 3rd party tools from Red-gate , but was hoping someone had
>> > written
>> > a simple script that i could use
>> >
>> > Thanks
>> >
>> >
>>
>|||You can still do this by scripting the databases to seperate folders and
comparing them with a Diff tool. I have found that BeyondCompare works well,
but Windiff would work fine too. Whatever is on one side but not the other
is what is missing. I currently do this for a database with 375 tables and
450 Stored Procedures in an environment with 20 developers making changes
daily. The developers are supposed to be checking changes in through Visual
Source Safe, but often forget to do so. I catch the problems before they
become an issue and let the developers know that need to check their changes
in/out of VSS.
"Hassan" wrote:
> I wasnt looking at all details such as text of sprocs, triggers, views,etc..
> just the names of objects that are not present
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:%231TsN$mkFHA.3148@.TK2MSFTNGP09.phx.gbl...
> > One thing you could try is to script out all the objects from each
> database
> > into two separate folders (with the option of a separate file for each
> > object). And then compare the folders using a tool like WinDiff that comes
> > with Visual Studio.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
> >
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:uilnoVmkFHA.3544@.TK2MSFTNGP15.phx.gbl...
> > >I would like to compare 2 dbs at an object level to ensure that all
> schema
> > > are the same on the 2 dbs and give me differences with any
> > >
> > > I know of 3rd party tools from Red-gate , but was hoping someone had
> > > written
> > > a simple script that i could use
> > >
> > > Thanks
> > >
> > >
> >
> >
>
>|||This tool allows you to view all the db contents al logical level
as well as to query the oledb schemas. Might be of some help (free)
http://151.100.3.84/technicalpreview/
Friday, February 24, 2012
does a table exist?
having trouble with procs that drop tables before creating them. Other users
get the message, "cannot drop table tblTest ... doesn't exist in the system
catalog".
I need to do something like,
If tblTest exists
Drop tblTest
...
then recreate the table
ThanksNickl wrote:
> Does anyone know if you can check if an object (eg a table) exists. I am
> having trouble with procs that drop tables before creating them. Other use
rs
> get the message, "cannot drop table tblTest ... doesn't exist in the syste
m
> catalog".
> I need to do something like,
> If tblTest exists
> Drop tblTest
> ...
> then recreate the table
> Thanks
>
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
Say I want to check if table "Departments" exists (from the "Generate
SQL Scripts" option in Enterprise Manager):
if exists (select * from dbo.sysobjects
where id = object_id(N'[dbo].[Departments]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Departments]
Just substitute your table name (and owner [dbo]?) for Departments.
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/ AwUBQgA9TYechKqOuFEgEQIBvwCgyWX4oG3wDVTW
URVNdrLkAz6/WKUAnRak
h8BmLTTPTkyE2MvNYl2mkVGH
=UYde
--END PGP SIGNATURE--|||Hello Nickl,
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tblTest'
Aaron Weiker
http://aaronweiker.com/
http://sqlprogrammer.org/
> Does anyone know if you can check if an object (eg a table) exists. I
> am
> having trouble with procs that drop tables before creating them. Other
> users
> get the message, "cannot drop table tblTest ... doesn't exist in the
> system
> catalog".
> I need to do something like,
> If tblTest exists
> Drop tblTest
> ...
> then recreate the table
> Thanks|||Or...
if object_id('your_tb','U') is not null
drop table your_tb
-oj
"Nickl" <Nickl@.discussions.microsoft.com> wrote in message
news:4A514243-6D69-427F-8F0B-2B6D1B4481E3@.microsoft.com...
> Does anyone know if you can check if an object (eg a table) exists. I am
> having trouble with procs that drop tables before creating them. Other
> users
> get the message, "cannot drop table tblTest ... doesn't exist in the
> system
> catalog".
> I need to do something like,
> If tblTest exists
> Drop tblTest
> ...
> then recreate the table
> Thanks
>|||Thanks everyone, good methods all. I really like yours oj, it looks very bri
ef
NIck Lindner
"oj" wrote:
> Or...
> if object_id('your_tb','U') is not null
> drop table your_tb
> --
> -oj
>
> "Nickl" <Nickl@.discussions.microsoft.com> wrote in message
> news:4A514243-6D69-427F-8F0B-2B6D1B4481E3@.microsoft.com...
>
>
Sunday, February 19, 2012
DocumentID not returned in Adventureworks
The Large Binary Object example installed with SQL Server 2005 has a table with the DocumentID as the key. When the row is inserted it should return the DocumentID that was created. When you debug the example stored procedure you can see the documentID is created and correct. When you run the sample unmodified it always returns -1 as the documentID. It appears the stored procedure is catching an exception and assigning the documentID a value of -1 as seen here in the Adventureworks LOB sample sored procedure (below).
However, it appears that something with the datbase engine or proce is broken and Microsoft knew this becasue the assignment to documentID upon return from the stored proc is commented out (see below). In fact the whole sample is faked because when you follow it you realize that it is reading into the database one document and writing out one that already existed in the database..
Does anyone know how to get the DocumentID back from the stored procedure that inserted the binary object into the Documents table of Adventureworks?
Thanks in advance.
Portion of Adventure works usp_InsertDocument
RAISERROR ('Insert failed.', 16, 1);
END TRY
BEGIN CATCH
SET @.DocumentID = -1;
RETURN(1);
END CATCH;
END -- END of usp_InsertDocument
;
Portion of LargeBinaryObject.cs
using (SqlConnection sqlConn = new SqlConnection(connectionString))
{
using (SqlCommand sprocCommand = new SqlCommand("[Production].[usp_InsertDocument]", sqlConn))
{
sqlConn.Open();
sprocCommand.CommandType = CommandType.StoredProcedure;
// Add time to the title because there is an unique constraint on this column.
sprocCommand.Parameters.Add(new SqlParameter("@.Title", SqlDbType.NVarChar, 50));
sprocCommand.Parameters[0].Value = fileName + DateTime.Now.TimeOfDay.ToString();
sprocCommand.Parameters.Add(new SqlParameter("@.FileName", SqlDbType.NVarChar, 400));
sprocCommand.Parameters[1].Value = fullFileName;
sprocCommand.Parameters.Add(new SqlParameter("@.FileExtension", SqlDbType.NVarChar, 8));
sprocCommand.Parameters[2].Value = fileExtension;
sprocCommand.Parameters.Add(new SqlParameter("@.Status", SqlDbType.TinyInt));
sprocCommand.Parameters[3].Value = 1;
sprocCommand.Parameters.Add(new SqlParameter("@.Document", SqlDbType.Image));
sprocCommand.Parameters[4].Value = bytes;
sprocCommand.Parameters.Add(new SqlParameter("@.DocumentID", SqlDbType.Int));
sprocCommand.Parameters[5].Direction = ParameterDirection.Output;
sprocCommand.ExecuteNonQuery();
//int DocumentID = (int)sprocCommand.Parameters[5].Value;
}
This here is a pretty easy one:
SqlCommand cmd = new SqlCommand("usp_YourProc");
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = conn;
SqlParameter param_InputoutputTest = new SqlParameter("@.InputoutputTest", SqlDbType.Int);
param_InputoutputTest.Value = "1";
param_InputoutputTest.Direction = ParameterDirection.InputOutput;
SqlParameter param_ReturntTest = new SqlParameter("@.ReturntTest", SqlDbType.Int);
param_ReturntTest.Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(param_InputoutputTest);
cmd.Parameters.Add(param_ReturntTest);
conn.Open();
cmd.ExecuteNonQuery();
Console.WriteLine(cmd.Parameters["@.ReturntTest"].Value.ToString());
Console.WriteLine(cmd.Parameters["@.InputoutputTest"].Value.ToString());
conn.Close();
ALTER PROCEDURE usp_YourProc
(
@.InputoutputTest INT OUTPUT
)
AS
SELECT @.InputoutputTest = -1
RETURN 2
HTH, Jens K. Suessmeyer.
-
http://www.sqlserver2005.de
-
Documented object name
I have been trying to gather information on the task log and have noted an inconsistency with the naming of an object within BOL 2005. Please have a look at the original post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=277667&SiteID=1
Forgot to mention, but I did have a look at the handels to find out which file was being access so that I could provide the filename and version but I couldn't find out exactely which one: (if you want, let me know which file it is so that I can send you the version)
C: File C:\Program Files\Common Files\Microsoft Shared\Help 8
10: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
A4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
B0: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
B4: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_6e805841
C0: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
C4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
CC: File C:\Program Files\Common Files\Microsoft Shared\Help 8\msenv.dll
EC: File C:\WINDOWS\SYSTEM32\STDOLE2.TLB
F4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
178: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
27C: File C:\Program Files\Common Files\Microsoft Shared\MSEnv\dte80a.olb
4F0: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MValidator.HxD
504: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_6e805841\ATL80.dll
50C: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MKWD_K.HxW
520: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
584: File C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\security.config.cch
588: File C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\enterprisesec.config.cch
5D0: File C:\WINDOWS\ASSEMBLY\NativeImages_v2.0.50727_32\index108.dat
5EC: File C:\WINDOWS\ASSEMBLY\pubpol1.dat
5F8: File C:\Program Files\Common Files\Microsoft Shared\Help 8\Microsoft.WizardFrameworkVS.dll
604: File C:\Program Files\Common Files\Microsoft Shared\Help 8\Microsoft.WizardFramework.dll
614: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sorttbls.nlp
61C: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sortkey.nlp
624: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82
694: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6AC: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6B4: File C:\WINDOWS\ASSEMBLY\GAC_MSIL\Microsoft.VisualStudio.CommonIDE\8.0.0.0__b03f5f7f11d50a3a\microsoft.visualstudio.commonide.dll
6C8: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6D0: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\ksc.nlp
6D4: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6D8: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6E4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6E8: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\xjis.nlp
6F8: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\big5.nlp
704: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\prcp.nlp
714: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MKWD_F.HxW
72C: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sqlcc9.HxS
730: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\colsql9.HxS
74C: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MTOC_SQLCC.HxH
760: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sqltut9.HxS
764: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\ssmport3.HxS
768: File C:\Program Files\Common Files\Microsoft Shared\Help 8\1033\dv_dexplore.hxs
770: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
7B0: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
818: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
820: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
850: File C:\WINDOWS\SYSTEM32\MSHTML.TLB
858: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
8BC: File C:\WINDOWS\SYSTEM32\DXTMSFT.DLL
8C4: File C:\WINDOWS\SYSTEM32\dxtrans.dll
940: File C:\WINDOWS\SYSTEM32\iepeers.dll
9F4: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MValidator.HxD
A14: File C:\Program Files\Common Files\Microsoft Shared\Help 8\1033\dexplore.hxq
A24: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sql90.hxq
A54: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\ssm3.hxq
B00: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
C60: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\udb9.HxS
Hello - I think there is a doc bug opened on this, so you should see a correction in either the next release of BOL or the refresh after that. The delay has to do with the time it takes for technical review and translations into the 9 or so languages for BOL.
Thanks for the catch!
Buck Woody
|||Thanks Buck, I don't envy the task of translating and verifying everything in BOL .
Many thanks
Max
Documented object name
I have been trying to gather information on the task log and have noted an inconsistency with the naming of an object within BOL 2005. Please have a look at the original post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=277667&SiteID=1
Forgot to mention, but I did have a look at the handels to find out which file was being access so that I could provide the filename and version but I couldn't find out exactely which one: (if you want, let me know which file it is so that I can send you the version)
C: File C:\Program Files\Common Files\Microsoft Shared\Help 8
10: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
A4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
B0: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
B4: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_6e805841
C0: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
C4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
CC: File C:\Program Files\Common Files\Microsoft Shared\Help 8\msenv.dll
EC: File C:\WINDOWS\SYSTEM32\STDOLE2.TLB
F4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
178: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
27C: File C:\Program Files\Common Files\Microsoft Shared\MSEnv\dte80a.olb
4F0: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MValidator.HxD
504: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.ATL_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_6e805841\ATL80.dll
50C: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MKWD_K.HxW
520: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
584: File C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\security.config.cch
588: File C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\enterprisesec.config.cch
5D0: File C:\WINDOWS\ASSEMBLY\NativeImages_v2.0.50727_32\index108.dat
5EC: File C:\WINDOWS\ASSEMBLY\pubpol1.dat
5F8: File C:\Program Files\Common Files\Microsoft Shared\Help 8\Microsoft.WizardFrameworkVS.dll
604: File C:\Program Files\Common Files\Microsoft Shared\Help 8\Microsoft.WizardFramework.dll
614: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sorttbls.nlp
61C: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\sortkey.nlp
624: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.2180_x-ww_522f9f82
694: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6AC: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6B4: File C:\WINDOWS\ASSEMBLY\GAC_MSIL\Microsoft.VisualStudio.CommonIDE\8.0.0.0__b03f5f7f11d50a3a\microsoft.visualstudio.commonide.dll
6C8: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6D0: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\ksc.nlp
6D4: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
6D8: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6E4: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
6E8: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\xjis.nlp
6F8: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\big5.nlp
704: File C:\WINDOWS\ASSEMBLY\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\prcp.nlp
714: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MKWD_F.HxW
72C: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sqlcc9.HxS
730: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\colsql9.HxS
74C: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MTOC_SQLCC.HxH
760: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sqltut9.HxS
764: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\ssmport3.HxS
768: File C:\Program Files\Common Files\Microsoft Shared\Help 8\1033\dv_dexplore.hxs
770: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
7B0: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
818: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
820: File C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
850: File C:\WINDOWS\SYSTEM32\MSHTML.TLB
858: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
8BC: File C:\WINDOWS\SYSTEM32\DXTMSFT.DLL
8C4: File C:\WINDOWS\SYSTEM32\dxtrans.dll
940: File C:\WINDOWS\SYSTEM32\iepeers.dll
9F4: File C:\Documents and Settings\All Users\Application Data\Microsoft Help\MS.SQLCC.v9_2057_MValidator.HxD
A14: File C:\Program Files\Common Files\Microsoft Shared\Help 8\1033\dexplore.hxq
A24: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\sql90.hxq
A54: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\ssm3.hxq
B00: File C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9
C60: File C:\Program Files\Microsoft SQL Server\90\Tools\Books\1033\udb9.HxS
Hello - I think there is a doc bug opened on this, so you should see a correction in either the next release of BOL or the refresh after that. The delay has to do with the time it takes for technical review and translations into the 9 or so languages for BOL.
Thanks for the catch!
Buck Woody
|||Thanks Buck, I don't envy the task of translating and verifying everything in BOL .
Many thanks
Max
Friday, February 17, 2012
Document Object Code
I've spent the last two hours looking for an example of this, but I've
come up short. What I was trying to do was create a 'test' which would
toggle a rectangles hidden property. Unfortunately, I can't seem to
figure out how to send my toggle function a document object.
Here's what I'm after. A 'bundle' report for my sales team. From
parameters, they choose a client to print for, and then select a series
of true/false parameters. Each 'sub-report' is contained in a
rectangle which will render only if the corresponding true/false is = true. In the rectangle hidden property, I had set the expression
=Code.setHidden(this)
Hoping that it would send the 'rectangle2' object to the setHidden(),
which would test the parameters, and correspondingly hide where
appropriate.
Any ideas?
Thanks much.
Brian AckermannIs it not possible to pass a document object to a code block?
Thanks,
Brian Ackermann
Document map Problem
not find out which object in the report is causing the map to be generated.
I have a Chart and a matrix in the report. How can I figure out what is
causing the map to get created?
TIA
Deanthe one that's named is the one with something in the label; remove that value
"Dean" wrote:
> I accidentally created a document map and would like to remove it but I can
> not find out which object in the report is causing the map to be generated.
> I have a Chart and a matrix in the report. How can I figure out what is
> causing the map to get created?
> TIA
> Dean
>
>