|
LOL entertaining post...
I know that the card is under powered although he is a game so he would notice real quick.
I am going to check on the DX thing though I was just hoping I could turn off some features in expressions because like I said when I toned it down in VS it made a big difference.
Humble Programmer
|
|
|
|
|
Hello,
First, a quick summary of our situation:
We are using Visual Studio 2008, with VSTO installed, and OpenXML 2.0 ;
We developped an Add-In for Office 2007 that needs to use Isolated Storage:
normal saving process does not use isolated storage, but when trying to save large xml content, it actually occurs and we get an IsolatedStorageException "unable to determine caller domain".
Now the detailed facts:
* We have developped an Add-In for Office 2007, using VSTO and OPENXML 2.0.
* During a long XMLDocument.Save operation, we get an Exception.
* Looking at the exception stack, we found out that for big operations like the one we wanted to do, IsolatedStorage was invloved: just before IsolatedStorage operations start there is a MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary() call.
I copied the Exception stack at the end of my post.
* The Exception says "unable to determine callers domain".
On this article: http://blogs.msdn.com/shawnfa/archive/2006/01/18/514407.aspx
it is said that this is because our application is not ClickOnce, and has its appdomain.CurrentDomain.ActivationContext property set to null.
* VSTO is responsible for creating an application domain for each Add-In that is loaded. I guess we cannot change that. Source:
http://www.vikasgoyal.net/office/VSTO%20Application%20AddIn%20Architecture.aspx
* Before executing the Save statement that crashes the program, I tried to load my assembly in another application domain using AppDomainSetup creating an AppDomain app and then caliing app.CreateInstanceAndUnwrap(...).
When I tried, I got the following exception : "Could not load type 'IsolatedStorage.IsolatedStorageHelper' from assembly 'SUMO 2007, Version=2.1.3758.26177, Culture=neutral, PublicKeyToken=4408dabe99529f64'."
I guess VSTO does not allow our assembly to be launched on another application domain, but I'm not sure of this.
At this point, I'm pretty stuck, so any kind of help or suggestion is welcome. I 'd be glad to give you more details on our project if that could help fixing this issue.
Thanks in advance,
Aurélien
Exception Stack:
at System.IO.IsolatedStorage.IsolatedStorage._InitStore(IsolatedStorageScope scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type assemblyEvidenceType, Evidence appEv, Type appEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressEmulationStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Xml.XmlUtf8RawTextWriter.FlushBuffer()
at System.Xml.XmlUtf8RawTextWriter.RawText(Char* pSrcBegin, Char* pSrcEnd)
at System.Xml.XmlUtf8RawTextWriter.RawText(String s)
at System.Xml.XmlUtf8RawTextWriter.WriteStartElement(String prefix, String localName, String ns)
at System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlDocument.Save(XmlWriter w)
at SUMO_2007.PackageManager.EAttributePackageDataManager.TablePackageDisplayAttributes(String Docpath) in F:\SSE v2.1\SUMO 2007\erms.rule\erms.Package.rule.DataManager\EAttributePackageDataManager.vb:line 857
|
|
|
|
|
Hello,
I have a .mdb database with approx. 100 000 records linked to a combobox on a simple form in VS .net VB. It takes over one minute to populate a 'standard issue' combobox, I believe it's awful slow. I tried to use a third-party listbox (a trial from devexpress suite), it's lightning fast in comparison. But hey, I need a combobox Could you please tell me if there's any way of making things a bit faster? Is there a good replacement to the standard combo that can be bound to an MS Access database?
Thanks in advance for you input
-Tony-
P.S. I also tried to play with different connection options etc, tried loading xml file into the combobox - it's the same problem, too slow...
|
|
|
|
|
aa2010 wrote: 100 000 records linked to a combobox
|
|
|
|
|
Life is a computer program and every one is the programmer of his own life.
|
|
|
|
|
Life is like a box of chocolates. Sometimes it contains nuts.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Some people like nuts.
|
|
|
|
|
The issue you are facing here is that you have too many items in the combo box. 100K items is unusable from a users point of view - how are they ever going to find anything? I suspect that you are looking to achieve the effect of a lookup combo where the data is presented based on what the user types in (a la an autocomplete combo). The reason the third party listbox is so fast is that it is using virtualisation to load only a subset of the data - more gets added on demand.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Yep. This is a simple dictionary app, so in fact I am using it more like a lookuplistbox/lookupcombobox (dropdown style = simple) whereby a user instead of picking the desired value from the dropdown list finds whatever he types into the combo. A while ago I tried that in Delphi - worked OK, loaded in less than a sec.
|
|
|
|
|
You might want to look into the AutoCompleteMode[^] property then.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
This may be a dumb question, so feel free to ignore this, but are you sure a combo box is what you really want here? How on earth are the users expected to use a combo box with 100,000 entries in it? Trying to find the entry you are look for in a drop-down with 100,000 entries is going to be really hard to use in the real world.
Could you possibly implement some sort of filter where the users could type in part of the data they are looking for, then use that to query the table and load up the matching results based on the search criteria entered. So, for example if it was a list of names and they typed "Smith" then it would only load names like Smith* into the list. If you search for "combo box autocomplete" or similar then you might find something that would help.
|
|
|
|
|
After importing the xml file to dataset , it contains 3 tables .its linked
How I can join these tables into one table.
|
|
|
|
|
why do you want to do that?
|
|
|
|
|
I have one xml file like the following.Inorder to save the student details to sql server database, first i imported to dataset then the dataset contain 3 tables HEADER,STUDENT,RESULT.I want save the details as student name,id,subject,mark .
please help
<MAIN
<Header>
<ID>94</ID>
<TransactionDate>20/03/2010 16:10</TransactionDate>
</Header>
<STUDENT>
<ID>1076523</ID>
<NAME/>
<PLACE>101</PLACE>
<RESULT>
<SUBJECT>MATHS</SUBJECT>
<MARK>465.9</MARK>
</RESULT>
<RESULT>
<SUBJECT>Secondary</SUBJECT>
<MARK>272.4</MARK>
</RESULT>
</STUDENT>
<STUDENT>
<ID>AP1076524</ID>
<NAME/>
<PLACE>117-09-D000004-00</PLACE>
<RESULT>
<SUBJECT>Principal</SUBJECT>
<MARK>592.0</MARK>
</RESULT>
</STUDENT>
</MAIN>
|
|
|
|
|
I repeat:
WHY do you want to do that?
Yes. I get it that you have three tables and you want to save it into sql table. But why not have three tables in sql as well? why do you want to combine tables to enter into sql?
Som
|
|
|
|
|
hI,really sorry, am new to xml programming .
Pls check my xml file format.if i want to save the data as
studentid,studentname,subject,mark
1 John Maths 92
1 John ENGLISH 42
2 MATH 90
2 ENGLISH 89
can you please explain how to read the xml and save the details in the table.
( i dont know how to access data from sub tables in the dataset)
<MAIN
<Header>
<ID>SAS</ID>
<TransactionDate>20/03/2010 16:10</TransactionDate>
</Header>
<STUDENT>
<ID>1</ID>
<NAME>jONH</<NAME>
<PLACE>KK</PLACE>
<RESULT>
<SUBJECT>MATHS</SUBJECT>
<MARK>92</MARK>
</RESULT>
<RESULT>
<SUBJECT>ENGLISH</SUBJECT>
<MARK>42</MARK>
</RESULT>
</STUDENT>
<STUDENT>
<ID>2</ID>
<NAME/>
<PLACE>J</PLACE>
<RESULT>
<SUBJECT>MATHS</SUBJECT>
<MARK>90</MARK>
<SUBJECT>ENGLISH</SUBJECT>
<MARK>85</MARK>
</RESULT>
</STUDENT>
</MAIN>
|
|
|
|
|
may be reading a book may help. its gonna be a long chapter to write here.
|
|
|
|
|
ok,can u please tell me how to loop trough the child tables in a dtaset.
dim r as datarow
for each r in ds.parent table..
like this how to read sub table of parent table in the dataset
|
|
|
|
|
foreach(DataTable table in ds.Tables)
foreach(DataRow row in table.Rows)
{
foreach(DataColumn column in table.Columns)
{
}
}
|
|
|
|
|
In the future please format any code snippets or xml like this, using the pre tags. What you have unreadable and will mostly get you ignored by those that can help the most.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If the two datatables are in the same dataset, you can create datarelations
between them, and use the GetChildRows, GetParentRow methods to do something similar to joins.
I hope this helps.
Best,
Sanket Sirotiya
http://www.urchha.com/
|
|
|
|
|
Can u describe your question in more detail.
Like by giving example what exactly u want to do??
So, that we can help in better way.
Jinal Desai
|
|
|
|
|
Hi, thanks for ur support.The following is my xml.
I have two tables .videos and actors . I need the code to read and save the xml data as follows.
Videos table
titleID title director format
100 Gentleman Jonathan Lynn DVD
101 Her Alibi Bruce Beresford DVD
Actorstable
titleID Actor ActorID
100 Eddie Murphy M123
100 John J23
101 Eddie S623
xml file
<?xml version="1.0" encoding="utf-8"?>
<Videos>
<Video>
<ID>100</ID>
<Title>Gentleman</Title>
<Director>Jonathan Lynn</Director>
<Actors>
<Actor>Eddie Murphy</Actor>
<ActorID>M123</ActorID>
<Actor>John</Actor>
<ActorID>J23</ActorID>
</Actors>
<Format>DVD</Format>
</Video>
<Video>
<ID>101</ID>
<Title>Her Alibi</Title>
<Director>Bruce Beresford</Director>
<Actors>
<Actor>Eddie</Actor>
<ActorID>S623</ActorID>
</Actors>
<Format>DVD</Format>
</Video>
</Videos>
|
|
|
|
|
You can use datarelation in dataset,
relate your two tables that will reside in one
dataset.
And in that way you can manually access individual element from
datarelation and generate xml or you can use LINQ.
Hope this will help!
Jinal Desai - LIVE
|
|
|
|
|
Hi,
I have an xml file like the following. want to save the xml file either in one table or two tables. but i dont know how to link these two tables in the dataset.
Inorder to save the xml file into my database first import to dataset (dsSource.ReadXml(xmlfilename))and it comes in two tables in the dataset. how i can save this xml file into sql table.
xml file contains a main node student under that sub nodes are there
student -main node
name
id
place
Result-sub node
subject
mark
subject
mark
.....
result-sub node ending
student node end
Thanks in advance
|
|
|
|