Article View: borland.public.delphi.database.dotnet
Article #553Re: TClientDataSet.CreateDataSet in NUnit causes threading error
From: David Wilcockson
Date: Wed, 29 Dec 2004 15:29
Date: Wed, 29 Dec 2004 15:29
25 lines
1658 bytes
1658 bytes
Have you put [STAThread] in your project source? Best wishes David "Bryce K. Nielsen" <bryce@sysonyx.com> wrote in message news:41c249fe$1@newsgroups.borland.com... >I have an application that uses a TClientDataSet and when I run the >application in NUnit, the code that calls the TClientDataSet.CreateDataSet >creates the following error: > > Invalid threading model (STAThreadAttribute is required) > > This doesn't seem to happen when I reference my package from a Delphi app. > to run. So, my question is A) what do I need to do to get this to work in > NUnit, and B) does this mean I can't thread TClientDataSets? > > -BKN >
Technical Details
Message-ID:
<41d2cdeb@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<41c249fe$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1effe6,6f46632f64b7e31a X-Google-Attributes: gid1effe6,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "David Wilcockson" <dnwatlibriosdotcom> From: "David Wilcockson" <dnwatlibriosdotcom> Newsgroups: borland.public.delphi.database.dotnet References: <41c249fe$1@newsgroups.borland.com> Subject: Re: TClientDataSet.CreateDataSet in NUnit causes threading error Date: Wed, 29 Dec 2004 15:29:50 -0000 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 212.158.226.174 Message-ID: <41d2cdeb@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1104334315 212.158.226.174 (29 Dec 2004 07:31:55 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail