.net loses sp result when calling executeXmlReader. please help

Im trying to return xml from sql.
The xml is made up of different fragments, some using FOR XML ... syntax.
The result is a valid xml doc.
There is a working stored proc that returns the xml

In .net i'm having problems loading this up.
I've now tried installing sqlxml managed classes and the following appears 
to work when stepping through, but the result just disappears.


----CODE START
        Dim dbg As Boolean = True
        'XMD = New
SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
        XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
catalog=xxxx;user id=user;password=xxx")
        XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
        XMD.CommandText = "select_xxx_xxx"
        XMD.ClientSideXml = True
        'XMD.RootTag = "root"
        'CN.Open()
        Try
            '            XR = CMD.ExecuteXmlReader()
            'Dim mydoc As New XmlDocument
            'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
            'Dim sux As System.Xml.XmlReader
            XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()

        Catch ex As System.Exception
            System.Diagnostics.Debug.WriteLine(ex.Message)
            dbg = False
        Finally
            If dbg Then
                System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
            End If
        End Try
        Return XR.ReadInnerXml()

----CODE END

I've looked in sql profiler and the stored proc is definitely being run. So 
the login is ok and the stored proc works fine. (In fact the whole damn thing 
used to work in classic asp)

Does anyone know why the result is being lost?
Thanks

0
11/10/2004 1:49:14 PM
dotnet.xml 7266 articles. 0 followers. Follow

5 Replies
553 Views

Similar Articles

[PageSpeed] 16

Hi Adolf

This works fine for me against the pubs database.

SP:
CREATE PROCEDURE dbo.test
	(
		
		@test int OUTPUT
	)
AS
	SELECT @test = 23
	SELECT TOP 1 au_lname FROM authors FOR XML AUTO
	RETURN 34

Code:
        Me.SqlConnection1.Open()
        Dim x As Xml.XmlReader = Me.SqlCommand1.ExecuteXmlReader()
        MessageBox.Show(Me.SqlCommand1.Parameters("@test").Value)
        MessageBox.Show(Me.SqlCommand1.Parameters("@RETURN_VALUE").Value)
        Dim d As New Xml.XmlDocument
        d.Load(x)
        MessageBox.Show(d.OuterXml)
        Me.SqlConnection1.Close()

Gets back the value of the output parameter, the return value, and the XML.

Nigel


"adolf garlic" wrote:

> Im trying to return xml from sql.
> The xml is made up of different fragments, some using FOR XML ... syntax.
> The result is a valid xml doc.
> There is a working stored proc that returns the xml
> 
> In .net i'm having problems loading this up.
> I've now tried installing sqlxml managed classes and the following appears 
> to work when stepping through, but the result just disappears.
> 
> 
> ----CODE START
>         Dim dbg As Boolean = True
>         'XMD = New 
> SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
>         XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
> catalog=xxxx;user id=user;password=xxx")
>         XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
>         XMD.CommandText = "select_xxx_xxx"
>         XMD.ClientSideXml = True
>         'XMD.RootTag = "root"
>         'CN.Open()
>         Try
>             '            XR = CMD.ExecuteXmlReader()
>             'Dim mydoc As New XmlDocument
>             'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
>             'Dim sux As System.Xml.XmlReader
>             XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()
> 
>         Catch ex As System.Exception
>             System.Diagnostics.Debug.WriteLine(ex.Message)
>             dbg = False
>         Finally
>             If dbg Then
>                 System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
>             End If
>         End Try
>         Return XR.ReadInnerXml()
> 
> ----CODE END
> 
> I've looked in sql profiler and the stored proc is definitely being run. So 
> the login is ok and the stored proc works fine. (In fact the whole damn thing 
> used to work in classic asp)
> 
> Does anyone know why the result is being lost?
> Thanks
> 
0
11/10/2004 2:29:22 PM
:) deep joy - it works

but i'm confused as to why my code didn't, but appears to do the same thing

I tried a million variations on this but none of them worked.

Thanks 

"Nigel Armstrong" wrote:

> Hi Adolf
> 
> This works fine for me against the pubs database.
> 
> SP:
> CREATE PROCEDURE dbo.test
> 	(
> 		
> 		@test int OUTPUT
> 	)
> AS
> 	SELECT @test = 23
> 	SELECT TOP 1 au_lname FROM authors FOR XML AUTO
> 	RETURN 34
> 
> Code:
>         Me.SqlConnection1.Open()
>         Dim x As Xml.XmlReader = Me.SqlCommand1.ExecuteXmlReader()
>         MessageBox.Show(Me.SqlCommand1.Parameters("@test").Value)
>         MessageBox.Show(Me.SqlCommand1.Parameters("@RETURN_VALUE").Value)
>         Dim d As New Xml.XmlDocument
>         d.Load(x)
>         MessageBox.Show(d.OuterXml)
>         Me.SqlConnection1.Close()
> 
> Gets back the value of the output parameter, the return value, and the XML.
> 
> Nigel
> 
> 
> "adolf garlic" wrote:
> 
> > Im trying to return xml from sql.
> > The xml is made up of different fragments, some using FOR XML ... syntax.
> > The result is a valid xml doc.
> > There is a working stored proc that returns the xml
> > 
> > In .net i'm having problems loading this up.
> > I've now tried installing sqlxml managed classes and the following appears 
> > to work when stepping through, but the result just disappears.
> > 
> > 
> > ----CODE START
> >         Dim dbg As Boolean = True
> >         'XMD = New 
> > SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
> >         XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
> > catalog=xxxx;user id=user;password=xxx")
> >         XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
> >         XMD.CommandText = "select_xxx_xxx"
> >         XMD.ClientSideXml = True
> >         'XMD.RootTag = "root"
> >         'CN.Open()
> >         Try
> >             '            XR = CMD.ExecuteXmlReader()
> >             'Dim mydoc As New XmlDocument
> >             'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
> >             'Dim sux As System.Xml.XmlReader
> >             XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()
> > 
> >         Catch ex As System.Exception
> >             System.Diagnostics.Debug.WriteLine(ex.Message)
> >             dbg = False
> >         Finally
> >             If dbg Then
> >                 System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
> >             End If
> >         End Try
> >         Return XR.ReadInnerXml()
> > 
> > ----CODE END
> > 
> > I've looked in sql profiler and the stored proc is definitely being run. So 
> > the login is ok and the stored proc works fine. (In fact the whole damn thing 
> > used to work in classic asp)
> > 
> > Does anyone know why the result is being lost?
> > Thanks
> > 
0
11/10/2004 2:47:10 PM
New problem

The solution you supplied fails when the stored procedure in question has 
input parameters.

The result that comes back now is
Invalid command sent to ExecuteXmlReader.  The command must return an Xml 
result

"adolf garlic" wrote:

> Im trying to return xml from sql.
> The xml is made up of different fragments, some using FOR XML ... syntax.
> The result is a valid xml doc.
> There is a working stored proc that returns the xml
> 
> In .net i'm having problems loading this up.
> I've now tried installing sqlxml managed classes and the following appears 
> to work when stepping through, but the result just disappears.
> 
> 
> ----CODE START
>         Dim dbg As Boolean = True
>         'XMD = New 
> SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
>         XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
> catalog=xxxx;user id=user;password=xxx")
>         XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
>         XMD.CommandText = "select_xxx_xxx"
>         XMD.ClientSideXml = True
>         'XMD.RootTag = "root"
>         'CN.Open()
>         Try
>             '            XR = CMD.ExecuteXmlReader()
>             'Dim mydoc As New XmlDocument
>             'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
>             'Dim sux As System.Xml.XmlReader
>             XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()
> 
>         Catch ex As System.Exception
>             System.Diagnostics.Debug.WriteLine(ex.Message)
>             dbg = False
>         Finally
>             If dbg Then
>                 System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
>             End If
>         End Try
>         Return XR.ReadInnerXml()
> 
> ----CODE END
> 
> I've looked in sql profiler and the stored proc is definitely being run. So 
> the login is ok and the stored proc works fine. (In fact the whole damn thing 
> used to work in classic asp)
> 
> Does anyone know why the result is being lost?
> Thanks
> 
0
11/11/2004 5:39:13 PM
Hi Adolf

I've just tried adding an input parameter to the SP, and modified the code 
and it still works...

Nigel

SP:
ALTER PROCEDURE dbo.test

	(
		@id int,	
		@test int OUTPUT
	)

AS
	SELECT @test = 23
	SELECT Food FROM FavouriteFoods WHERE id = @id FOR XML AUTO
	RETURN 34


Code:
        Me.SqlConnection1.Open()
        Me.SqlCommand1.Parameters("@id").Value = InputBox("Tell Me", 
"Number", "2")
        Dim x As Xml.XmlReader = Me.SqlCommand1.ExecuteXmlReader()
        MessageBox.Show(Me.SqlCommand1.Parameters("@test").Value)
        MessageBox.Show(Me.SqlCommand1.Parameters("@RETURN_VALUE").Value)
        Dim d As New Xml.XmlDocument
        d.Load(x)
        MessageBox.Show(d.OuterXml)
        Me.SqlConnection1.Close()

"adolf garlic" wrote:

> New problem
> 
> The solution you supplied fails when the stored procedure in question has 
> input parameters.
> 
> The result that comes back now is
> Invalid command sent to ExecuteXmlReader.  The command must return an Xml 
> result
> 
> "adolf garlic" wrote:
> 
> > Im trying to return xml from sql.
> > The xml is made up of different fragments, some using FOR XML ... syntax.
> > The result is a valid xml doc.
> > There is a working stored proc that returns the xml
> > 
> > In .net i'm having problems loading this up.
> > I've now tried installing sqlxml managed classes and the following appears 
> > to work when stepping through, but the result just disappears.
> > 
> > 
> > ----CODE START
> >         Dim dbg As Boolean = True
> >         'XMD = New 
> > SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
> >         XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
> > catalog=xxxx;user id=user;password=xxx")
> >         XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
> >         XMD.CommandText = "select_xxx_xxx"
> >         XMD.ClientSideXml = True
> >         'XMD.RootTag = "root"
> >         'CN.Open()
> >         Try
> >             '            XR = CMD.ExecuteXmlReader()
> >             'Dim mydoc As New XmlDocument
> >             'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
> >             'Dim sux As System.Xml.XmlReader
> >             XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()
> > 
> >         Catch ex As System.Exception
> >             System.Diagnostics.Debug.WriteLine(ex.Message)
> >             dbg = False
> >         Finally
> >             If dbg Then
> >                 System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
> >             End If
> >         End Try
> >         Return XR.ReadInnerXml()
> > 
> > ----CODE END
> > 
> > I've looked in sql profiler and the stored proc is definitely being run. So 
> > the login is ok and the stored proc works fine. (In fact the whole damn thing 
> > used to work in classic asp)
> > 
> > Does anyone know why the result is being lost?
> > Thanks
> > 
0
11/12/2004 12:08:02 PM
Nigel,

That's probably because you've gone back to using just a single piece of xml 
 in the result set (don't forget that I am returning multiple snippets of xml)

The way I managed to get this working in the end (in another posting) is this:

 -  use a sqlxml command 
 - make sure to put placeholders for each parameter in the commandtext (this 
is crap as it does not appear documented) e.g. "select_bananas ?,?"
 - put the result into a stream (putting it into an xmlreader fails with 
invalid xml)
 - load the alleged 'invalid xml' in the stream into a dom
it works

i don't understand why
thanks for trying though

i hate microsoft for their poorly documented afterthought products.
not knowing about the "?,?" wasted soooo much time
in protest i have moved to firefox and have just opened a gmail account  and 
am recommending everyone i know to do the same :]

Let me know if you do ever manage to get it working with a manually crafted 
bit of xml.





"Nigel Armstrong" wrote:

> Hi Adolf
> 
> I've just tried adding an input parameter to the SP, and modified the code 
> and it still works...
> 
> Nigel
> 
> SP:
> ALTER PROCEDURE dbo.test
> 
> 	(
> 		@id int,	
> 		@test int OUTPUT
> 	)
> 
> AS
> 	SELECT @test = 23
> 	SELECT Food FROM FavouriteFoods WHERE id = @id FOR XML AUTO
> 	RETURN 34
> 
> 
> Code:
>         Me.SqlConnection1.Open()
>         Me.SqlCommand1.Parameters("@id").Value = InputBox("Tell Me", 
> "Number", "2")
>         Dim x As Xml.XmlReader = Me.SqlCommand1.ExecuteXmlReader()
>         MessageBox.Show(Me.SqlCommand1.Parameters("@test").Value)
>         MessageBox.Show(Me.SqlCommand1.Parameters("@RETURN_VALUE").Value)
>         Dim d As New Xml.XmlDocument
>         d.Load(x)
>         MessageBox.Show(d.OuterXml)
>         Me.SqlConnection1.Close()
> 
> "adolf garlic" wrote:
> 
> > New problem
> > 
> > The solution you supplied fails when the stored procedure in question has 
> > input parameters.
> > 
> > The result that comes back now is
> > Invalid command sent to ExecuteXmlReader.  The command must return an Xml 
> > result
> > 
> > "adolf garlic" wrote:
> > 
> > > Im trying to return xml from sql.
> > > The xml is made up of different fragments, some using FOR XML ... syntax.
> > > The result is a valid xml doc.
> > > There is a working stored proc that returns the xml
> > > 
> > > In .net i'm having problems loading this up.
> > > I've now tried installing sqlxml managed classes and the following appears 
> > > to work when stepping through, but the result just disappears.
> > > 
> > > 
> > > ----CODE START
> > >         Dim dbg As Boolean = True
> > >         'XMD = New 
> > > SqlXmlCommand(ConfigurationSettings.AppSettings("ConnectionString").ToString()) '"storedprocname"
> > >         XMD = New SqlXmlCommand("Provider=SQLOLEDB;data source=xxxx;initial 
> > > catalog=xxxx;user id=user;password=xxx")
> > >         XMD.CommandType = SqlXmlCommandType.Sql 'CommandType.StoredProcedure
> > >         XMD.CommandText = "select_xxx_xxx"
> > >         XMD.ClientSideXml = True
> > >         'XMD.RootTag = "root"
> > >         'CN.Open()
> > >         Try
> > >             '            XR = CMD.ExecuteXmlReader()
> > >             'Dim mydoc As New XmlDocument
> > >             'mydoc.Load(CMD.ExecuteXmlReader().ReadInnerXml)
> > >             'Dim sux As System.Xml.XmlReader
> > >             XR = XMD.ExecuteXmlReader() ' Stream() ' XmlReader()
> > > 
> > >         Catch ex As System.Exception
> > >             System.Diagnostics.Debug.WriteLine(ex.Message)
> > >             dbg = False
> > >         Finally
> > >             If dbg Then
> > >                 System.Diagnostics.Debug.WriteLine(XR.ReadInnerXml)
> > >             End If
> > >         End Try
> > >         Return XR.ReadInnerXml()
> > > 
> > > ----CODE END
> > > 
> > > I've looked in sql profiler and the stored proc is definitely being run. So 
> > > the login is ok and the stored proc works fine. (In fact the whole damn thing 
> > > used to work in classic asp)
> > > 
> > > Does anyone know why the result is being lost?
> > > Thanks
> > > 
0
11/16/2004 10:07:04 AM
Reply:

Similar Artilces:

Help Adding up multiple calculated cells
I have 8 columns that MAY contain NOTHING or may contain text chosen from a lookup name from a data validation pick list. Lic3 won't contain a value UNLESS Lic1 AND Lic2 are populated. I have 8 columns range named Lic1, Lic2, etc to hold a chosen license name. I have 8 other columns used for number counts relating to the lookups I have range named Lic1Cnt, Lic2Cnt, etc which hold a number such as 12. I need to add up the value calculated for each Lic based on looking up the text in a table, getting the price and then multiplying by the Lic? Cnt number. Some records may have only a singl...

Help for Outlook 2002
Hi. Recently I had to have my operating system reloaded because I had installed bad software. I have an iPAQ that uses Outlook 2002 and that program was not reinstalled. I've looked around to download it and can't find a download. Can someone help? Thanks. Jaywilly There is no download. You probably have an Outlook 2002 CD that came with your iPAQ. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "jaywilly" <anonymous@discuss...

VB code help
Hi all, I am creating an application on Visual Basic 2008 to convert any image into icon. I have written code (see below) which works fine. It converts any image to icon in specified size. But the problem is that when I try to use that icon I get error message saying "invalid image property" or "invalid image" etc. Please can any friend tell me that what amendments i need in my code below to achive my objective. help in shape of code will be much appriciated. Dim imageFinal As System.Drawing.Image = Nothing Dim g As System.Drawing.Graphics = Nothing imag...

Help with Outlook #2
Hi Got a problem with my outlook account, I haver a pop3 connect box and I have put in a password for my email account under tools/email accounts but even though this is accepted I have to do send/receive before any mail comes through to my outlook inbox, can anyone help? Cheers CH "chasler (removethis) @hotmail.com" <anonymous@discussions.microsoft.com> wrote in message news:c05a01c43828$7ce0c890$a301280a@phx.gbl... > Hi > Got a problem with my outlook account, I haver a pop3 > connect box and I have put in a password for my email > account under tools/email ...

Outlook 2000 SR1 slow with Exchange 5.5 -- Help?
Dear Group- I have a critical user (!) who has seen his Outlook 2000 (SR1) get appreciably 'laggy' in the past couple of months. Opening calendar items or emails takes a couple seconds. Server is Exch 5.5 SP4 with 1gb ram on a PIII 800, 10k RPM Raid5 array. Problem is local to his PC -- opening his account from another station is AOK. Ping times and file transfers from his PC to any network server is nominal for our switched 100mbit ethernet. This is the second occurrence. To clear it last time, I rebuilt his PC from bare metal. This fixed it for a couple months, but the lag ha...

Help #20
Hi, I have a worksheet with 3 columns: "month, Item type, quantity" : month Item Type quantity Jan. 1 2 2 1 3 1 Feb. 1 2 2 2 1 3 I want to rearrange this according to "Item Type" verses "month" in a new worksheet where it sums the quantity of each type (as follows): Item Type Jan. ...

Formula help!
I haven't used Excel in a long time, so your help would be appreciated. I'm trying to come up with a formula that takes the following into consideration. Customers subscribe to a service that have an hourly cost, but costs can be determined by the fraction of the hour. This hourly cost is different for subscribers and non subscribers. An example would be the following: Column E represents whether or not they are a subscriber/Column F is their connection time (1/2 hour = 0.50)/Column G is their calculated price. How do I do the following: If E3=Y(Yes) then F3=0.50*130.00 therefore G3=65...

HELP!! Vlookup
I have this code to look in all sheets, but it stops after it finds the first entry. Im looking through 40+ sheets that could have the same criteria for the lookup. How can I have the first result in a6, then the second in a7, etc... a6 =vlookallsheets($D$4,$H$2:$N$2,1,FALSE) can I have a6 look through sheets 1-40, a7 2-40, a8 3-40, etc... Function VLOOKAllSheets(Look_Value As Variant, Tble_Array As Range, _ Col_num As Integer, Optional Range_look As Boolean) Function VLOOKAllSheets(Look_Value As Variant, Tble_Array As Range, _ Col_num As Integer, Optional Range_look As Boolean) '&#...

Please Help #5
I am using Outlook 2003 and I need to have a copy of my calendar on my desktop. Could someone please show me how to do this. When you say that you "need to have a copy of my calendar on my desktop", do you mean that you need have the data on your machine or that you want to see a graphical representation of the calendar as your desktop background? <babalink@hotmail.com> wrote in message news:a7r9105i7h7g395ast409mji9ltpe87i97@4ax.com... >I am using Outlook 2003 and I need to have a copy of my calendar on my > desktop. Could someone please show me how to do this. ...

button help
I have a macro that executes correctly..but how do I get it to work thr a button? the macro name is "job" and I tried the buttons click even w/ code... "run.[job] -- Message posted from http://www.ExcelForum.com Hi Brian. Choose/click the button icon from the Control box toolbar, when button appears, right click on it, view code, then copy paste your original code into the new module. Mathew "-Brian-H- >" <<Brian-H-.115vdd@excelforum-nospam.com> wrote in message news:Brian-H-.115vdd@excelforum-nospam.com... I have a macro that executes correctly..but...

Help with Macro please...
Hi Everyone I've come across a macro which I have tried using, but nothing seems to happen. This macro is run from Excel and interacts with Outlook, so I've made sure to turn on the Microsoft Outlook 11.0 Object Library in TOOLS - REFERENCES from the VBE window. If Outlook is not running, I do get the error message I'm supposed to get (i.e. "No message selected"), but beyond that I have absolutely no indication that the Macro actually does anything. The code is as follows: Sub CopyFromOutlook() Dim olApp As New Outlook.Application Dim olExp...

Help #19
Ok, I on a project for my boss and this is what she wants. We use the acess database to formulate information dealing with our company. We have to update them weekly and we update them using excel. We also have a set chart that coincides with the information, however every time we change teh information we have to manually change the chart. Is there anyway to link the chart and information so that it automatically updates when something is changed. (the chart is in powerpoint, not sure if this makes a difference). Thanks ...

help fixing a calculation problem
i have an big file that takes a while to calculate. I keep my calculation set on manual. a few times a day I create a csv. file out of a database and open it in excel and the file starts to calc and I end up having to wait it out. Anyone have an idea on how to prevent that from happening? -- barrfly Excel User - Energy markets ------------------------------------------------------------------------ barrfly's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=4141 View this thread: http://www.excelforum.com/showthread.php?threadid=482195 Try this .. Before yo...

Uninitialized help...Money 2004
None of the help links at the right of the money will work. I just says something about a bad link. I have WinXP SP1 with all the latest updates. I upgraded from Money 2001. Any sugesstions? I tried uninstalling and re-installing already. Thanks! Try deleting internet temporary file from Internet Options control panel. "Michael A. Dice" <mikedice@mail.com> wrote in message news:0d2f01c3512d$937a9b90$a601280a@phx.gbl... > None of the help links at the right of the money will > work. I just says something about a bad link. > > I have WinXP SP1 with all the...

Help with creating drop down
Hi,, can anyone help me on how i can create a drop down combination(i'm not sure what it is called)? x y z X1 y1 z1 x2 y2 z2 x3 y3 z3 What im trying to do is if cell A1 has a drop down list(with X,Y,Z selection), i would like cell B1 to return another drop down list that contains a list corresponding to what was selected in cell A1.. so if cell A1 is Y, then cell B2 will show another list with Y1,Y2 and Y3 selection... Im using MS Office 2007. Please advise and thank you very much. Hi, take a look at Debra web has excellent examples http://www.contextur...

Please Help! Messed up Hard Drive from using Partition Magic
I wanted to use Partition Magic to partition my hard drive, so I used the boot CD. When I loaded it up, it said that there were 2 errors in my hard drive and it could fix them, so I pressed fix. Unfortunately, I was running Vista and I only know now that they're incompatible. However, now my hard drive is completely screwed! If I plug my hard drive into my computer, my computer refuses to do anything after POST, it doesn't boot a CD or run anything from the hard drive. I unplugged my hard drive and it's booting CDs now, even though my CD was the primary boot device anyway...

http://blogs.technet.com/dst2007
I've seen this site listed buried in some posts, but I thought it might be helpful to have it listed as a main post heading. Many questions are answered there. -- Lee Owens http://leeowens337.blogspot.com ...

Closing/Opening Outlook 2007 PST File Loses Indexing
Using XP SP3 / WS 4.0 / O2007. I have several PSTs open in Outlook 2007 that are fully indexed by Windows Search 4.0. If I close them, and then later in another session reopen them, all indexing seemed to be lost and I can no longer search them until the index is built. Is this expected behavior? Is there any fix or workaround? Are they being closed cleanly or is Outlook repairing them on open? I've found that PST repairs typically caused reindexing "ajkessel" <ajkessel@gmail.com> wrote in message news:0d19da75-1277-4c42-99af-0314f3532bbb@b31g2000prb.googlegroups.com.....

Refresh calling form
My main form opens a form that makes changes to the data bound to a subform in my main form. Trying to keep everything as generic as possible, what I want to do is something like this: if strParentName <> "" Then if CurrentProject.AllForms(strParentName).Isloaded Then Forms(strParentName).Filter=Forms(strParentName).Filter (forces refresh) For each <subform> in <Parent form reference> <force a refresh of that subform> Next <subform> endif endif What's the syntax for the "for each..." structure? T...

pivot table help #8
Hi, I have a pivot table with following fields: Product, Party, Qty, Rate, Amt Product, Party are row fields, Qty, Rate, Amt are Data fields Everything works fine in the pivot table, and Qty, Rate and Amt have their own subtotal rows. I just want the Rate to have a weighted average. Lets say Hydrochloric Acid (Product) - Party1 - Qty:4 - Rate:100 - Amt:400 - Party2 - Qty:8 - Rate:90 - Amt:720 The subtotals for this row appear as: Subtotal: Qty:12 - Rate:190 - Amt:1120 Qty:12 is correct because qty is 4 and 8 bottles that is 12 Amt:1120 is correct because 400+720 = 1120 But Rate sub...

Conditional Formatting Problems HELP!
I used conditional formatting for the first time to display colors i cells based on the value of the cell. Everything works fine excep when I try to save I get the message "Excel could not save all the dat and formatting you recently added to nnnn.xls". Microsofts kb has an article that says you cannot exceed 2,050 row (Q215783), but I certainly don't have nearly that many rows. I do hav a pretty large number of cells with conditional formatting and wonde if there is some other limitation that I can't find. Everything els about this sheet is very plain stuff. Can anyone ...

Visio with .NET
Hi, I want to draw a org chart in my .NET project using Visio. Is it possible by any chance if I have Visio SDK? Regards, Rajesh thanks for the information. but i guess they are all addins for visio. what i want to do is to embed the visio viewer in my asp.net page and then show the org chart in the viewer through visio. i referenced the Microsoft.Office.Interop.Visio.dll in my asp.net project. but i am not able to get any thing when i say "Dim appVisio As New Visio.Application()". can you please show me a direction on how we do it? "Chris Roth" <visioguy@hotmail.kom...

xml-export in vb.net
hello NG i try to create a little generic vb.net function for exporting access-tables to xml-files. ---===>>> CUT IN <<<===--- Function fncXmlExport(ByVal strDBpath As String, ByVal strTableName As String, ByVal strXmlFileName As String) Dim objDataSet As New System.Data.DataSet Dim objXmlDocument As New System.Xml.XmlDocument Dim objCmd As System.Data.OleDb.OleDbDataAdapter Dim objCon As System.Data.OleDb.OleDbConnection Dim strCon As String strCon = "provider=Microsoft.Jet.OLEDB.4.0; data source=" & strDBpath objCon = New System.Data.OleDb.OleDb...

Offline defrag for exchange 2003, Help
I have a 2003 exchange server running on 2003 Server. I have reached the 15 gig limit of Exchange I have cleaned out as much mail as I can buy still need space . How do you do a offline defrag of the .EDB files???? I know how to do a defrag for exchange 2000 but the commands do not work.... PLease help.... Here is a link that explains how to do it: http://support.microsoft.com/default.aspx?scid=kb;en-us;254132&Product=exch2003 -- Mark Fugatt Exchange MVP http://www.exchangetrainer.com http://www.msexchange.org "Hlobell" <anonymous@discussions.microsoft.com> wrote in...

Adding MFC class in VS.net 2003
Hi all. I have converted one of my projects from VS6.0 to VS2003. Now I want to add a new (MFC) class, but when I try to, I get the error: "MFC classes can only be added to MFC projects" I have other project where it is possible to add MFC classes, but not this one. Has anybody seen this, or know what the problem might be. Of course, my project *is* an MFC project. -- Cheers Bjarne Nielsen ...