Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Monday, March 19, 2012

"View Report" button.

Would someone be able to tell me if this is a bug or not. When I have two
parameters (both text boxes) and change the first one and click on the "View
Report" button to refresh the data with the new parameter values it blanks
the report out and I do not see "processing report" like I normally do. On
the second click it processes the report.
When I change a parameter in the second text box and click "View Report", it
processes the first click.
Seems like a bug of sorts. Anyone encounter this before? I'm more than
happy to provide the RDL.
Best Regards,
Benjamin PierceThis sometimes happens if parameter 2 has values based on a query and the
value of that query is dependent on the value of parameter 1 (hierarchical
parameters).
What happens is that when you choose a value for P1, we try to go back and
get values for P2. Now before we get those values the user clicks view
report. Since you've requested a to view a report with only one parameter
specified, we send back a page asking for the second parameter value.
However due to browser refresh, it doesn't look like anything happened. Now
you provide a value for parameter 2, you get the report rendered.
You can make this stop happening by providing a default value for parameter
2.
-Lukasz
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Benjamin Pierce" <bpierce@.opentext.com> wrote in message
news:ujptP0AcEHA.384@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Would someone be able to tell me if this is a bug or not. When I have two
> parameters (both text boxes) and change the first one and click on the
> "View
> Report" button to refresh the data with the new parameter values it blanks
> the report out and I do not see "processing report" like I normally do.
> On
> the second click it processes the report.
> When I change a parameter in the second text box and click "View Report",
> it
> processes the first click.
> Seems like a bug of sorts. Anyone encounter this before? I'm more than
> happy to provide the RDL.
>
> Benjamin Pierce
>

"Version 2.0 Is Not A Compatible Version"

When using VS2003 and Reporting Services 2005, I am met with the following
compilation error after creating a dataset then trying to design it:
"Version 2.0 Is Not A Compatible Version"
I cant drag any tools to the design surface, or add any fields. I have both
SQL Server 2000 Reporting Services as well as 2005.
Anyone have a hint on how I can remedy this?
Here is the stack:
************** Exception Text **************
System.BadImageFormatException: Version 2.0 is not a compatible version.
at System.Reflection.CustomAttribute.CreateCAObject(Int32& propNum,
Assembly& assembly)
at System.Reflection.CustomAttribute.GetObject()
at
System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttribute
caItem, Type caType)
at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInfo
member, Type caType, Boolean inherit)
at System.Reflection.RuntimeFieldInfo.GetCustomAttributes(Type
attributeType, Boolean inherit)
at System.Xml.Serialization.XmlAttributes..ctor(ICustomAttributeProvider
provider)
at
Microsoft.ReportDesigner.Serialization.XmlAttributes..ctor(ICustomAttributeProvider
provider)
at
Microsoft.ReportDesigner.Serialization.TypeMapper.ImportMemberField(StructMapping
mapping, MemberInfo field)
at
Microsoft.ReportDesigner.Serialization.TypeMapper.ImportTypeMembers(StructMapping
mapping, Object obj)
at
Microsoft.ReportDesigner.Serialization.TypeMapper.ImportStructMapping(Type
objBaseType, Object obj)
at Microsoft.ReportDesigner.Serialization.TypeMapper.GetTypeModel(Type
baseType, Object obj)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteObject(Type
objType, Object obj, String name, String ns)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteArrayContent(Object
array, ArrayMapping mapping, String ns)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteArray(Object
array, String name, String ns, ArrayMapping mapping)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteMember(Object
component, Object obj, MemberMapping memberMapping, String name, String ns)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteStructureContent(Object
obj, StructMapping mapping, String ns)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteStructure(Object
obj, String name, String ns, StructMapping mapping)
at
Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteObject(Type
objType, Object obj, String name, String ns)
at
Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.SerializeComponent(IDesignerSerializationManager
manager, Object component, Object serializationStream)
at
Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.Serialize(IDesignerSerializationManager
manager, Object value)
at
Microsoft.ReportDesigner.Serialization.UndoManager.Serialize(CodeDomSerializer
serializer, Object component)
at
Microsoft.ReportDesigner.Serialization.UndoManager.TakeSnapshot(ICollection
undoEntries, UndoSnapshot snapshot)
at
Microsoft.ReportDesigner.Serialization.UndoUnit.ComponentChanging(Object
comp, MemberDescriptor member)
at
Microsoft.ReportDesigner.Serialization.UndoManager.OnComponentChanging(Object
sender, ComponentChangingEventArgs e)
at
System.ComponentModel.Design.ComponentChangingEventHandler.Invoke(Object
sender, ComponentChangingEventArgs e)
at
Microsoft.VisualStudio.Designer.Host.DesignerHost.OnComponentChanging(Object
component, MemberDescriptor member)
at
Microsoft.ReportDesigner.Design.FieldChooserControl.Transaction(Command
command, String sUndo, Field field, Field oldfield)
at Microsoft.ReportDesigner.Design.FieldChooserControl.OnAddClick()
at Microsoft.ReportDesigner.Design.FieldChooserControl.ShowContextMenu()
at
Microsoft.ReportDesigner.Design.FieldChooserControl.listView1_MouseUp(Object
sender, MouseEventArgs e)
at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)Its an issue with VS 2003 and the 2000 Report Designer. Is there any way I
can specify 2000's Report Designer rather than have it default to 2005?
Right now I cant put the projects in the same solution, and the conversion
wizard tries to convert my web project as well as my report project, which I
do not want.
"Elliot Rodriguez" <elliotrodriguezatgeemaildotcom> wrote in message
news:eolheyESGHA.5656@.TK2MSFTNGP11.phx.gbl...
> When using VS2003 and Reporting Services 2005, I am met with the following
> compilation error after creating a dataset then trying to design it:
> "Version 2.0 Is Not A Compatible Version"
> I cant drag any tools to the design surface, or add any fields. I have
> both SQL Server 2000 Reporting Services as well as 2005.
> Anyone have a hint on how I can remedy this?
> Here is the stack:
> ************** Exception Text **************
> System.BadImageFormatException: Version 2.0 is not a compatible version.
> at System.Reflection.CustomAttribute.CreateCAObject(Int32& propNum,
> Assembly& assembly)
> at System.Reflection.CustomAttribute.GetObject()
> at
> System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttribute
> caItem, Type caType)
> at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInfo
> member, Type caType, Boolean inherit)
> at System.Reflection.RuntimeFieldInfo.GetCustomAttributes(Type
> attributeType, Boolean inherit)
> at System.Xml.Serialization.XmlAttributes..ctor(ICustomAttributeProvider
> provider)
> at
> Microsoft.ReportDesigner.Serialization.XmlAttributes..ctor(ICustomAttributeProvider
> provider)
> at
> Microsoft.ReportDesigner.Serialization.TypeMapper.ImportMemberField(StructMapping
> mapping, MemberInfo field)
> at
> Microsoft.ReportDesigner.Serialization.TypeMapper.ImportTypeMembers(StructMapping
> mapping, Object obj)
> at
> Microsoft.ReportDesigner.Serialization.TypeMapper.ImportStructMapping(Type
> objBaseType, Object obj)
> at Microsoft.ReportDesigner.Serialization.TypeMapper.GetTypeModel(Type
> baseType, Object obj)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteObject(Type
> objType, Object obj, String name, String ns)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteArrayContent(Object
> array, ArrayMapping mapping, String ns)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteArray(Object
> array, String name, String ns, ArrayMapping mapping)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteMember(Object
> component, Object obj, MemberMapping memberMapping, String name, String
> ns)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteStructureContent(Object
> obj, StructMapping mapping, String ns)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteStructure(Object
> obj, String name, String ns, StructMapping mapping)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlWriter.WriteObject(Type
> objType, Object obj, String name, String ns)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.SerializeComponent(IDesignerSerializationManager
> manager, Object component, Object serializationStream)
> at
> Microsoft.ReportDesigner.Serialization.DesignXmlSerializer.Serialize(IDesignerSerializationManager
> manager, Object value)
> at
> Microsoft.ReportDesigner.Serialization.UndoManager.Serialize(CodeDomSerializer
> serializer, Object component)
> at
> Microsoft.ReportDesigner.Serialization.UndoManager.TakeSnapshot(ICollection
> undoEntries, UndoSnapshot snapshot)
> at
> Microsoft.ReportDesigner.Serialization.UndoUnit.ComponentChanging(Object
> comp, MemberDescriptor member)
> at
> Microsoft.ReportDesigner.Serialization.UndoManager.OnComponentChanging(Object
> sender, ComponentChangingEventArgs e)
> at
> System.ComponentModel.Design.ComponentChangingEventHandler.Invoke(Object
> sender, ComponentChangingEventArgs e)
> at
> Microsoft.VisualStudio.Designer.Host.DesignerHost.OnComponentChanging(Object
> component, MemberDescriptor member)
> at
> Microsoft.ReportDesigner.Design.FieldChooserControl.Transaction(Command
> command, String sUndo, Field field, Field oldfield)
> at Microsoft.ReportDesigner.Design.FieldChooserControl.OnAddClick()
> at Microsoft.ReportDesigner.Design.FieldChooserControl.ShowContextMenu()
> at
> Microsoft.ReportDesigner.Design.FieldChooserControl.listView1_MouseUp(Object
> sender, MouseEventArgs e)
> at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)
> at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
> at System.Windows.Forms.ListView.WndProc(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
>

"Using other editions of SQL Server for report data sources and/or the report server datab

Hi

My project is in .NET 2003 i.e. framework 1.1 and database in SQLServer 2000. But the reports have been developed using SQLServer 2005 Reporting Services. Now when I am trying to deploy them through deployment project of .NET its giving me following error:

"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services.

Now I am really confused with this. Can any one please guide me regarding this ASAP.

Thanks,

Falguni

You will need to use the SQL Server 2000 Reporting Services or upgrade to SQL Server 2005. SQL Server Reporting Services 2005 requires SQL 2005 (Express Edition does not count either)|||

hi vcsjones,

Thanks for the reply...

Actually I m trying this with reporting services of SQL Server 2005 trial version (express edition)... and database SQL Server 2000 enterprise edition (licenced version)...

So won't this wrk after mking n e settings or arrangements? Do I need to hv my database also in 2005 and not in 2000?

Thanks and Regards

|||

techieman:

Do I need to hv my database also in 2005 and not in 2000?

Yes that is correct.

|||

On my machine I was having both SQL Server 2000 and SQL Server 2005. I was using project server database and wss database of SQL Server 2000 and Reporting Services and its database of 2005. Accordingly I was getting following error while running reportserver of reporting services 2005:

"Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of Reporting Services

So I uninstalled SQL Server 2000 from my machine. I started using project server database and wss database of SQL Server 2000 from some other machine. For Reporting Services and its database of 2005 it used it from my machine.. So every thing worked fine and its not giving any error.

But my actually requirement is using project server database and wss database of SQL Server 2000 and Reporting Services and its database of 2005 for which I get above error.

So please help me out with this ASAP. Is there any work around for this?

Thanks...

"Users shopping for A were also interested in B"

How should I set up a database to be able to efficiently maintain
associations between related items?

Example: Users shopping for Lord Of The Rings trilogy were also
interested in The Hobbit.

There will be many (20000+) items for sale and I need to do this
efficiently, but I don't have an idea how could I do it.

TIAhttp://www.google.co.uk/groups?selm...ooglegroups.com

--
David Portas
SQL Server MVP
--|||Yeah but how to create these associations efficiently in the first
place?|||This called a relational division, and you can Google it. You want one
with a remainder for doing "shopping baskets".

Having said this, you are better off looking for a data mining tool
that will have the ability to set up the baskets on the fly for
somethign like Amazon.

Assuming you only want to have pairs in the baskets and do this only
once and not on the fly, you can set up a sparse matrix in SQL:

CREATE TABLE Pairs
(item_1_upc CHAR(13) NOT NULL,
item_2_upc CHAR(13) NOT NULL,
tally INTEGER DEFAULT 0 NOT NULL,
CHECK (item_1_upc < item_2_upc) ,
PRIMARY KEY (item_1_upc, item_2_upc));

Now go thru every order, pull out all possible pairs that occur more
than some threshold:

INSERT INTO Pairs(item_1_upc, item_2_upc, tally)
SELECT O1.upc, O2.upc, COUNT(*)
FROM Orders AS O1, Orders AS O2
WHERE O1.order_nbr = O2.order_nbr
AND O1.upc < O2.upc
GROUP BY O1.upc, O2.upc
HAVING COUNT(*) > @.some_limit;

>From the Pairs matrix, you can then build Triplets with whatever rules
you wish based on the tally. For example, given (a, b, 123) and
(b,c, 100) you know that (a,b,c, ??) cannot have more than 100
occurences, but if I have 1000 b's, the number could be as low as zero.|||The first query in the reply I posted does that ("efficiently" is moot
I suppose). If you need something different then please post DDL and
sample data so that we can understand what you need.

In reality, I think most e-tailers would not want to automate the
link-selling process. I suspect the results would be unpredictable and
I doubt that the major sites ever do it that way. Careful review and
selection of the linked products by the sales and marketing team will
probably give a better return.

--
David Portas
SQL Server MVP
--

"User does not have permission to perform this action." problem

hey people

having a nightmare getting asp.net 2.0 to work with sql server 2005 express, bit of a newbie with it. trying to display a table from my sql database and every time i run the aspx table im getting this error.

 User does not have permission to performthis action.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack tracefor more information about the error and where it originatedin the code.Exception Details: System.Data.SqlClient.SqlException: User does not have permission to performthis action.Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identifiedusing the exception stack trace below.Stack Trace:[SqlException (0x80131904): User does not have permission to performthis action.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 keep getting the user permission error, even though it says on the management console that i have access to the database
 
any ideas?
 
rob 
 

ok the error doesnt tell you that you cant login

the problem is you already login but you cant do action.

can you look your connection string and find out what account are you using.

then check that account's right in your SQL 2005 database,

maybe the right in that account is very small

|||

check if you user have not only rights to connect to database but also right to select from tables you use or execute rights to stored procedures so check database security and your user effective permissions on database objects

Thanks

|||

(having a nightmare getting asp.net 2.0 to work with sql server 2005 express, bit of a newbie with it. trying to display a table from my sql database and every time i run the aspx table im getting this error.)

If you don't have Management Studio you can download it in the first link below and the second link covers how to add object permissions for the Asp.net account post again if you still have question. Hope this helps.

http://msdn.microsoft.com/vstudio/express/sql/download/

http://forums.asp.net/thread/1492092.aspx

"User Cancelled" Error while viewing Crystal report

Hi,
I have a Crystal Reports v10 Report that has been working fine
for the past X years. It is invoked by a VB6 app using the
Report Viewer. For some reason, sometimes when the report is
executed, it displays the message "User Cancelled" immediately
after the viewer window is opened, even though the user did not
cancel the report. None of the code has changed, neither has the
report.

Does anyone have any clue as to why this message should appear?

Very urgent, Thanks in Advance...

Regards,
AnandhSometimes I see this message when there is an issue with the print spooler on the computer where the report is being generated. Try going to Control Panel > Administrative Tools > Services and then restarting the Print Spooler service. After doing this, reboot the computer.

If this doesn't work, then it isn't the print spooler causing the problem.

Good Luck! :)

"use database" not working after "create database"

I didn't think you could use CREATE DATABASE within a transaction.
"ATS" <ATS@.discussions.microsoft.com> wrote in message
news:5F6A2B04-1923-4BDB-B036-FF1B7C445477@.microsoft.com...
> PRB: "use database" not working after "create database"
> Please help,
> I have the following query:
> set XACT_ABORT on
> begin transaction
> create database MY_DB
> use MY_DB
> commit transaction
> The "use" statement fails saying the database does not exists, but I get
no
> error on the "create". And when I go to the server, sure enough the DB is
not
> there, which it should not be if the TX rolled back. So what is wrong? If
the
> "create" is bad, why do I not see an error on it?I do not think you can use the use statement inside a transaction either
"Armando Prato" wrote:

> I didn't think you could use CREATE DATABASE within a transaction.
> "ATS" <ATS@.discussions.microsoft.com> wrote in message
> news:5F6A2B04-1923-4BDB-B036-FF1B7C445477@.microsoft.com...
> no
> not
> the
>
>

"upload only" tables in merge subscription?

Is it possible to upload data in a single table from all subscribers to the
publisher in a merge subscription? All subscribers and the publisher are
running SS2005 (Express edition for subscribers). I'm familiar with the
download only option from publisher to subscribers, but need to do just the
opposite. If merge replication can't do this, how about transactional
replication, using a publication with just this one table? Creative
suggestions welcome.
TIA,
Eric Hall
Paul -
Thanks for the pointer. Since I only want to perform the "upload only" on 2
articles, it looks like I have to create a seperate publication for just
those tables. Odd that the upload only option was left out of the
sp_addmergearticle @.subscriber_upload_options parameter options. Download
only is there!
Thanks,
Eric
"Paul Ibison" wrote:

> Eric,
> although the 'modern' way of doing this is to use
> "@.subscriber_upload_options", you can still use -EXCHANGETYPE (please see
> http://www.replicationanswers.com/MergeChangesArticle1.asp).
> Cheers,
> Paul Ibison
>
>
|||Quite understnad - at first I thought it was a replacement for the
commandline parameter but then I realised there is some overlap but they
aren't the same thing. The "@.subscriber_upload_options" is pretty nice
addition though - it vastly reduces the amount of metadata involved, as the
triggers simply don't record the changes. I guess that's why it couldn't
replace the upload only option as this sin't really controlled in the
triggers.
Cheers,
Paul Ibison

"Update" in Trigger not working

Hi,

I am trying to concatenate the columns (PrevEmp01, PrevEmp02, PrevEmp03, PrevEmp04, PrevEmp05) into column (ft) using trigger:

CREATE TRIGGER [tg_prevemp_ft_update] ON [tStaffDir_PrevEmp]
FOR INSERT, UPDATE
AS
UPDATE tStaffDir_PrevEmp SET ft = PrevEmp01 + ' ' + PrevEmp02 + ' ' + PrevEmp03 + ' ' + PrevEmp04 + ' ' + PrevEmp05

I would expect the (ft) column will be populated accordingly regardless if any of the columns are (Null).
But the Trigger will only work when all the 5 columns are populated. If one of the column is (Null), the (ft) column will be (Null) too.

Please advise. Many Thanks.

Try this:

CREATE TRIGGER [tg_prevemp_ft_update]ON [tStaffDir_PrevEmp]FOR INSERT,UPDATEASUPDATE tStaffDir_PrevEmpSET ft =ISNULL(PrevEmp01,'') +' ' +ISNULL(PrevEmp02,'') +' ' +ISNULL(PrevEmp03,'') +' ' +ISNULL(PrevEmp04,'') +' ' +ISNULL(PrevEmp05,'')

Good luck.

|||

Thanks! It worked.

"unuse database"?

Hi,
I used database A:
use A
go
(do something)
After I worked with a database A, I want to drop it. I need to change to
another database B by issue the coommands
use B
go
drop databse A
go
I wonder if there is a command to "unuse" A so that I do not need use B to
drop A.
Thanks.You do not have to "unuse" the database; instead switch to master & drop the
desired database.
Anith|||Have to be connected to master to do this, not either of the databases you
are playing with. Then, run:
exec sp_detach_db @.dbname='databaseName'
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"§Chrissi§" wrote:

> Hi,
> I used database A:
> use A
> go
> (do something)
> After I worked with a database A, I want to drop it. I need to change to
> another database B by issue the coommands
> use B
> go
> drop databse A
> go
> I wonder if there is a command to "unuse" A so that I do not need use B to
> drop A.
> Thanks.
>
>|||USE master
but why would you want to do something in a database then drop it?
David Portas
SQL Server MVP
--|||Hi,
You can not a drop a database if it is being used by any session. Only way
is to change the session to point to another database
and drop the database.
Thanks
Hari
SQL Server MVP
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message
news:%23I8VriOUFHA.3176@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I used database A:
> use A
> go
> (do something)
> After I worked with a database A, I want to drop it. I need to change to
> another database B by issue the coommands
> use B
> go
> drop databse A
> go
> I wonder if there is a command to "unuse" A so that I do not need use B to
> drop A.
> Thanks.
>|||It is better for you to explicitly choose which database to reset context to
(ex: USE B) than let SQL Server decide by default. Otherwise, any following
T-SQL commands are not deterministic.
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message
news:%23I8VriOUFHA.3176@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I used database A:
> use A
> go
> (do something)
> After I worked with a database A, I want to drop it. I need to change to
> another database B by issue the coommands
> use B
> go
> drop databse A
> go
> I wonder if there is a command to "unuse" A so that I do not need use B to
> drop A.
> Thanks.
>

"unable to load MDT2G.DLL" (sql 7.0)?

I'm using sql server 7.0 - on "SQL Server Enterprise Manager" screen,
when I right click a table and select "Design Table" on the menu list,
I get error message box "Unable to load MDT2G.DLL".
I never had this before and don't know what happend.
What caused this and how to fix it ?
THANKS !
>
> I'm using sql server 7.0 - on "SQL Server Enterprise Manager"
> screen, when I right click a table and select "Design Table" on
> the menu list, I get error message box "Unable to load MDT2G.DLL".
> I never had this before and don't know what happened.
> What caused this and how to fix it ?
> THANKS !
>
The mdt2g.dll file could be corrupt. Try copying over it from your SQL CD
and see if it works for you.
Regards,
Eric Crdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.

"unable to load MDT2G.DLL" (sql 7.0)?

I'm using sql server 7.0 - on "SQL Server Enterprise Manager" screen,
when I right click a table and select "Design Table" on the menu list,
I get error message box "Unable to load MDT2G.DLL".
I never had this before and don't know what happend.
What caused this and how to fix it ?
THANKS !>
> I'm using sql server 7.0 - on "SQL Server Enterprise Manager"
> screen, when I right click a table and select "Design Table" on
> the menu list, I get error message box "Unable to load MDT2G.DLL".
> I never had this before and don't know what happened.
> What caused this and how to fix it ?
> THANKS !
>
--
The mdt2g.dll file could be corrupt. Try copying over it from your SQL CD
and see if it works for you.
Regards,
Eric Crdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.

"Unable to count the members of the level" error

Hi guys,
I encountering the following error whenever I try to create a new dimension
in the MS Analysis Server.
"Unable to count the members of the 'Area Code' level.Please check your
table joins."
I have check my table joins, all the valid. Also I am using the snowflake
schema.
How to resolve the issue?
Thanks
Akber.
When you process the dimension, the actual SQL that Analysis Server sends to
SQL Server is shown in the processing window. You can copy this and execute
it yourself in Query Analyzer to see if the results you get are what you
expect.
Jacco Schalkwijk
SQL Server MVP
"Akber" <Akber@.discussions.microsoft.com> wrote in message
news:92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
> Hi guys,
> I encountering the following error whenever I try to create a new
> dimension
> in the MS Analysis Server.
> "Unable to count the members of the 'Area Code' level.Please check your
> table joins."
> I have check my table joins, all the valid. Also I am using the snowflake
> schema.
> How to resolve the issue?
> --
> Thanks
> Akber.
|||You might also consider enabling the system-wide processing log file. This
is a best practice with Analysis Services.
To enable it, bring up Analysis Manager. Right-click on the server and
select "Properties..."
Then go to the "Logging" tab. Enable the processing log file and specify
some well known location, e.g. C:\OLAP_Processing.txt
Then all of the SQL Statements, begin/end times, # of records processed,
etc. -- everything that comes out in the processing dialog box -- will also
be written to the system-wide processing log file. This allows you to keep
long-term history of what was processed, when, and by-whom.
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid > wrote
in message news:ugLq4LqhEHA.3548@.TK2MSFTNGP09.phx.gbl...
> When you process the dimension, the actual SQL that Analysis Server sends
to
> SQL Server is shown in the processing window. You can copy this and
execute[vbcol=seagreen]
> it yourself in Query Analyzer to see if the results you get are what you
> expect.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Akber" <Akber@.discussions.microsoft.com> wrote in message
> news:92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
snowflake
>
|||and whats appends if you create the same SQL query in the query analyzer,
does the same query (with the same join) return something?
you can catch the query through the log or through the SQL Server profiler.
also, does your tables have some data ?
another way to understand what AS do is to put youself some value in the
dimension count property of your dimension level (put 10 for example)
then process the dimension and you'll see (in the process dialog box) again
the query used by AS to retreive the database values.
"Akber" <Akber@.discussions.microsoft.com> a crit dans le message de news:
92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
> Hi guys,
> I encountering the following error whenever I try to create a new
> dimension
> in the MS Analysis Server.
> "Unable to count the members of the 'Area Code' level.Please check your
> table joins."
> I have check my table joins, all the valid. Also I am using the snowflake
> schema.
> How to resolve the issue?
> --
> Thanks
> Akber.

"Unable to count the members of the level" error

Hi guys,
I encountering the following error whenever I try to create a new dimension
in the MS Analysis Server.
"Unable to count the members of the 'Area Code' level.Please check your
table joins."
I have check my table joins, all the valid. Also I am using the snowflake
schema.
How to resolve the issue'
Thanks
Akber.When you process the dimension, the actual SQL that Analysis Server sends to
SQL Server is shown in the processing window. You can copy this and execute
it yourself in Query Analyzer to see if the results you get are what you
expect.
Jacco Schalkwijk
SQL Server MVP
"Akber" <Akber@.discussions.microsoft.com> wrote in message
news:92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
> Hi guys,
> I encountering the following error whenever I try to create a new
> dimension
> in the MS Analysis Server.
> "Unable to count the members of the 'Area Code' level.Please check your
> table joins."
> I have check my table joins, all the valid. Also I am using the snowflake
> schema.
> How to resolve the issue'
> --
> Thanks
> Akber.|||You might also consider enabling the system-wide processing log file. This
is a best practice with Analysis Services.
To enable it, bring up Analysis Manager. Right-click on the server and
select "Properties..."
Then go to the "Logging" tab. Enable the processing log file and specify
some well known location, e.g. C:\OLAP_Processing.txt
Then all of the SQL Statements, begin/end times, # of records processed,
etc. -- everything that comes out in the processing dialog box -- will also
be written to the system-wide processing log file. This allows you to keep
long-term history of what was processed, when, and by-whom.
--
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:ugLq4LqhEHA.3548@.TK2MSFTNGP09.phx.gbl...
> When you process the dimension, the actual SQL that Analysis Server sends
to
> SQL Server is shown in the processing window. You can copy this and
execute
> it yourself in Query Analyzer to see if the results you get are what you
> expect.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Akber" <Akber@.discussions.microsoft.com> wrote in message
> news:92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
snowflake[vbcol=seagreen]
>|||and whats appends if you create the same SQL query in the query analyzer,
does the same query (with the same join) return something?
you can catch the query through the log or through the SQL Server profiler.
also, does your tables have some data ?
another way to understand what AS do is to put youself some value in the
dimension count property of your dimension level (put 10 for example)
then process the dimension and you'll see (in the process dialog box) again
the query used by AS to retreive the database values.
"Akber" <Akber@.discussions.microsoft.com> a crit dans le message de news:
92E7058A-4C42-481E-8179-ABACF327271E@.microsoft.com...
> Hi guys,
> I encountering the following error whenever I try to create a new
> dimension
> in the MS Analysis Server.
> "Unable to count the members of the 'Area Code' level.Please check your
> table joins."
> I have check my table joins, all the valid. Also I am using the snowflake
> schema.
> How to resolve the issue'
> --
> Thanks
> Akber.

"Unable To Connect to SQL Server" from Crystal 8.0

Hi All,

I am using Crystal Report 8.0 to create report on MSDE sp3a , but when I try to make connection Natively :
More Data Source->MiCrosoft SQL Server-> [Dialog opens]
then I type the ServerName, UserID and Password.

System hangs for a while, then I get this error :
"Unable To Connect to Sql server MyServer"

BUT IF I create system DSN (ODBC) then create the report, it works.

Why can't I create report Natively on MSDE ??

Thank you very much for any help,
KristWhat are you typing for ServerName? Is this database on a base or named instance? Also, don't it ask you for the database name?|||Hi,
Thanks for your response.

>What are you typing for ServerName?
I type 'XTANTO', it is my computer name, as I can see on service manager.

>Is this database on a base or named instance?
This is a base instance. FYI, this is a test computer, sp many 'install & uninstall' here, previously there is SQL Server personal edition there, but I already uninstalled it.
After that I install 'Client Connectivity only', and there is No way I can uninstall it. Then I install MSDE SP3a. and I get the error.
Does this give us any clue ?

>Also, don't it ask you for the database name?
Only after I type ServerName, UserID and Password correctly.
In this case, it doesn't give me list of database to choose because its error "Unable To Connect to SQL Server"

My last try will be reinstall win 98.
Do you think that will help ?

Thank you for your help,
Krist|||Go to Control Panel/Administrative Tools/Services. There should be a service that starts with MSSQL. Is it started? What is the full name of the service (or all the services that start with MSSQL)?|||Hi,

I am on Win98, there is NO services on control panel.
What else should I try ?

Thank you,
Krist|||Actually, here's a better question. Why are you running this on a Windows 98 machine??? Do a search for SQLScan on http://www.microsoft.com/downloads/details.aspx?FamilyID=9552d43b-04eb-4af9-9e24-6cde4d933600&displaylang=en

Run that on your machine. See what it says the name of the instance is.|||Hi Derrick,
Thanks for keep on helping..

>Actually, here's a better question. Why are you running this on a Windows >98 machine???
We are software developer company, we want to reach as wide market as possible, we want to keep on supporting windows 98.

The docs said Windows 98 is supported. Is there any known issue of MSDE 2000 on WIn 98 ?

Thank you,
Krist|||No that I know of. Did you run that tool on your computer?

"UAT" Managed test Post

using johnogorman@.netscape.net ACCT
Your display name is strange in that it doesn't seem to map to your email
address, but that's just a guess. If this was a test to see if you're coming
in as a "managed" customer, however, I can confirm that. :-)
Sincerely,
Stephen Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
"vikrant" <johnogorman@.netscape.net> wrote in message
news:uMQSgXrMEHA.3556@.TK2MSFTNGP09.phx.gbl...
> using johnogorman@.netscape.net ACCT
>

Friday, March 16, 2012

"Trusted for delegation".

MSSQL2K5
SP1
Im reading in BOL regarding Linked Servers:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/9e302c29-639d-4509-ba1e-cf45
2582c5c3.htm
and it says:
Requirements for the First/Middle Server (SQLSERVER1)
a.. The server must have an SPN registered by the domain administrator.
b.. The account under which SQL Server is running must be trusted for
delegation.
What is "trusted for delegation"? Where do I configure it?
TIA, ChrisRChrisR wrote:
> What is "trusted for delegation"? Where do I configure it?
This is a user object setting in Active Directory, usually set with
Active Directory Users & Computers.
http://support.microsoft.com/kb/305144/en-us|||Cool, thanks.
<tom.freedman@.gmail.com> wrote in message
news:1154456842.034250.326350@.i42g2000cwa.googlegroups.com...
> ChrisR wrote:
> This is a user object setting in Active Directory, usually set with
> Active Directory Users & Computers.
> http://support.microsoft.com/kb/305144/en-us
>

"TRUNCATE TABLE" in a sproc w/locked-down user

Hullo folks, I'm having what I assume is a fairly mundane security issue.

I have a SQL login that I am trying to restrict as much as possible. This account's sole goal in life is to hit the server, return some usage statistics, then truncate the table it received the statistics from. I would like to refrain from granting this login permissions on the physical target table if possible.

Usually I can wrap up "protected" operations in a stored procedure, then grant exec permissions for my user and I'm good to go. However, TRUNCATE TABLE gets cranky with me when I attempt the above method. I suspect that has to do with the fact that TRUNCATE TABLE is effectively modifying the table itself as opposed to merely deleting data.

Is it possible to grant this login ONLY execute permission on a stored proc that TRUNCATE's tables without giving the user any physical permissions? Am I going about this the wrong way?The only people who can use 'truncate' are the table owner, sysadmin, db_owner, and db_ddladmin; so if you have a user whose permissions are severely restricted I would not think 'truncate' would work, or if it would it would be a phaff to set up.

Why not just DELETE FROM, or use a temp table to create the statistics and return them?|||This is effectively what I ended up doing after making the same permissions determination. I had my heart set on Truncate do to the nature of the process itself, but I was able to work around the restriction using DELETE FROM and a local scheduled maintenance job.|||Is there a way he can call an osql command via xp_cmdshell that connects with a trusted connection that can truncate the table ? I tried some stuff with a server link to itself, but cannot truncate table link.db.owner.table, same goes with openquery (truncate not supported).|||That would present a larger security issue then outright granting the user required permissions. I definately don't want to expose trusted command line functionality to this login.

What I have now works, it's just not exactly the way I want it to. All of my research indicates that it will just have to be good enough as I cannot get around that pesky permissions requirement for TRUNCATE.|||In the past I have allowed a user to own a single table for a similar purpose. But that was for an import table, where the data was truncated, reloaded, diced up, and distributed to other tables. No other process even knew the table was there. It gets you out of having to have db_owner rights, but there is no other way around the requirement of owning the table.|||why dont you leave the table there and run a nightly process that truncates any table that had statistics grabbed from it

have an admin account run the nightly process, but the restricted user still gets their statistics

just a thought|||why dont you leave the table there and run a nightly process that truncates any table that had statistics grabbed from it

have an admin account run the nightly process, but the restricted user still gets their statistics

just a thought
That's the current working solution. The process runs a couple times a day, but same idea.

"trunc. log on chkpt" help

First time poster...
Alright this is what I got...I am running MSSQL server 2000.
I have already restored a copy of the production db to our test sql server.

What I need to do is run some update scripts (from 3rd party vendor, going to newer version of their product). The database is about 60Gb and I filled up the transaction log (causing later updates to fail) while running one of their scripts that executed 194 routines of:

alter table Table_Name add New_Column int
GO
EXEC sp_bindefault mg_zero_dflt, [Table_Name.New_Column]
GO
update Table_Name set New_Column=1
GO

Will "sp_dboption 'dbname' 'trunc. log on chkpt' 'TRUE' " automatically truncate the transaction log when approaching the transaction log file limit while running these update scripts. Then when the updates are complete go ahead and "sp_dboption 'dbname' 'trunc. log on chkpt' 'FALSE' "

I'm not worried about logging the transactions during this process, I just don't want to have the transaction log fill up while running these scripts causing it to error out.

Or is there a way to make those changes using bcp?In the database properties window, go to the options tab and set your database recovery model to "simple". This should keep the log from filling up.
When you are finished, set the recovery model back to "full" and run an immediate backup.|||Thanks for the help. I remember seeing something about that and got sidetracked with the whole 'trunc. log on chkpt' idea. I'm in the process of finishing the scripts on the test server and I'll update with results. Thanks again!|||I finished running the scripts late yesterday without any hitches. That was exactly what I was looking for!

"Tree View" with a SQL Server Database

We need to present hierarchical data on a web page, the same way the
tree view shows files in Windows Explorer. Here's the catch: that
tree view needs to be bound to a SQL Server database. How can this be
done?Simplist is an adjacency list. Store the parent ID along with each record,
also store the "full path" in a text string, such as 0001/0004/0007/0002
(the second node of the seventh node of the 4th node of the 1st node of the
tree). I use a function to generate a number for the string (below)
because each "path node" has to be the same length in order to perform a
correct "select" of the tree order. You also need a "sibling number" if you
want to order your nodes in an arbitrary way.

ALTER FUNCTION dbo.func_Get_Padded_Number8
(
@.number INTEGER
)
RETURNS VARCHAR(8)
AS
BEGIN
DECLARE @.Value VARCHAR(8)
DECLARE @.Length INTEGER

/*
Convert the number and get its string length
*/

SET @.Value = CONVERT ( VARCHAR ( 8 ), @.number )
SET @.Length = LEN ( @.Value )

/*
If the length is less than 8, pad it
*/
IF LEN ( @.Value ) < 8
BEGIN
SET @.Value = REPLACE ( SPACE ( 8 - @.Length ), ' ', '0' ) + @.Value
END

RETURN @.Value
END

Adding a new node is simple given the parent, you just find the highest
sibling number of the parent and increment it then insert a node, building
the path string by taking the parent and adding "/00n" (where n is the
sibling number). Listing all of the nodes in the tree structure can be done
easily like this:

SELECT dbo.Adjacency.ID, (a unique ID)
dbo.Adjacency.ID_Parent, (the unique ID of the parent of
this node)
dbo.Adjacency.ID_Index, (the sibling number of this child)
LEN(dbo.Adjacency.Path) / 9 AS Depth, (the depth of the
node, useful for building your tree structure afterwards)
FROM dbo.Adjacency
ORDER BY dbo.Adjacency.Path

Hope this helps some.

<imani_technology_spam@.yahoo.com> wrote in message
news:8be6e8.0312030710.3b40bc89@.posting.google.com ...
> We need to present hierarchical data on a web page, the same way the
> tree view shows files in Windows Explorer. Here's the catch: that
> tree view needs to be bound to a SQL Server database. How can this be
> done?|||This helps a lot. Thanks. I wonder if there is a practical graphical
solution in addition to the text-based solution?

"Robin Tucker" <idontwanttobespammedanymore@.reallyidont.com> wrote in message news:<bqn6dt$o7l$1$830fa7b3@.news.demon.co.uk>...
> Simplist is an adjacency list. Store the parent ID along with each record,
> also store the "full path" in a text string, such as 0001/0004/0007/0002
> (the second node of the seventh node of the 4th node of the 1st node of the
> tree). I use a function to generate a number for the string (below)
> because each "path node" has to be the same length in order to perform a
> correct "select" of the tree order. You also need a "sibling number" if you
> want to order your nodes in an arbitrary way.
> ALTER FUNCTION dbo.func_Get_Padded_Number8
> (
> @.number INTEGER
> )
> RETURNS VARCHAR(8)
> AS
> BEGIN
> DECLARE @.Value VARCHAR(8)
> DECLARE @.Length INTEGER
> /*
> Convert the number and get its string length
> */
> SET @.Value = CONVERT ( VARCHAR ( 8 ), @.number )
> SET @.Length = LEN ( @.Value )
> /*
> If the length is less than 8, pad it
> */
> IF LEN ( @.Value ) < 8
> BEGIN
> SET @.Value = REPLACE ( SPACE ( 8 - @.Length ), ' ', '0' ) + @.Value
> END
> RETURN @.Value
> END
> Adding a new node is simple given the parent, you just find the highest
> sibling number of the parent and increment it then insert a node, building
> the path string by taking the parent and adding "/00n" (where n is the
> sibling number). Listing all of the nodes in the tree structure can be done
> easily like this:
> SELECT dbo.Adjacency.ID, (a unique ID)
> dbo.Adjacency.ID_Parent, (the unique ID of the parent of
> this node)
> dbo.Adjacency.ID_Index, (the sibling number of this child)
> LEN(dbo.Adjacency.Path) / 9 AS Depth, (the depth of the
> node, useful for building your tree structure afterwards)
> FROM dbo.Adjacency
> ORDER BY dbo.Adjacency.Path
> Hope this helps some.
> <imani_technology_spam@.yahoo.com> wrote in message
> news:8be6e8.0312030710.3b40bc89@.posting.google.com ...
> > We need to present hierarchical data on a web page, the same way the
> > tree view shows files in Windows Explorer. Here's the catch: that
> > tree view needs to be bound to a SQL Server database. How can this be
> > done?|||Hi

I posted this a short time ago!
http://tinyurl.com/xw5s

John

<imani_technology_spam@.yahoo.com> wrote in message
news:8be6e8.0312050907.644b5abe@.posting.google.com ...
> This helps a lot. Thanks. I wonder if there is a practical graphical
> solution in addition to the text-based solution?
> "Robin Tucker" <idontwanttobespammedanymore@.reallyidont.com> wrote in
message news:<bqn6dt$o7l$1$830fa7b3@.news.demon.co.uk>...
> > Simplist is an adjacency list. Store the parent ID along with each
record,
> > also store the "full path" in a text string, such as 0001/0004/0007/0002
> > (the second node of the seventh node of the 4th node of the 1st node of
the
> > tree). I use a function to generate a number for the string (below)
> > because each "path node" has to be the same length in order to perform a
> > correct "select" of the tree order. You also need a "sibling number" if
you
> > want to order your nodes in an arbitrary way.
> > ALTER FUNCTION dbo.func_Get_Padded_Number8
> > (
> > @.number INTEGER
> > )
> > RETURNS VARCHAR(8)
> > AS
> > BEGIN
> > DECLARE @.Value VARCHAR(8)
> > DECLARE @.Length INTEGER
> > /*
> > Convert the number and get its string length
> > */
> > SET @.Value = CONVERT ( VARCHAR ( 8 ), @.number )
> > SET @.Length = LEN ( @.Value )
> > /*
> > If the length is less than 8, pad it
> > */
> > IF LEN ( @.Value ) < 8
> > BEGIN
> > SET @.Value = REPLACE ( SPACE ( 8 - @.Length ), ' ', '0' ) +
@.Value
> > END
> > RETURN @.Value
> > END
> > Adding a new node is simple given the parent, you just find the highest
> > sibling number of the parent and increment it then insert a node,
building
> > the path string by taking the parent and adding "/00n" (where n is the
> > sibling number). Listing all of the nodes in the tree structure can be
done
> > easily like this:
> > SELECT dbo.Adjacency.ID, (a unique ID)
> > dbo.Adjacency.ID_Parent, (the unique ID of the parent
of
> > this node)
> > dbo.Adjacency.ID_Index, (the sibling number of this
child)
> > LEN(dbo.Adjacency.Path) / 9 AS Depth, (the depth of
the
> > node, useful for building your tree structure afterwards)
> > FROM dbo.Adjacency
> > ORDER BY dbo.Adjacency.Path
> > Hope this helps some.
> > <imani_technology_spam@.yahoo.com> wrote in message
> > news:8be6e8.0312030710.3b40bc89@.posting.google.com ...
> > > We need to present hierarchical data on a web page, the same way the
> > > tree view shows files in Windows Explorer. Here's the catch: that
> > > tree view needs to be bound to a SQL Server database. How can this be
> > > done?