Component One TrueDB Fetch row style
I knew how to do it in VB6 but I can't figure it out in VB.NET
In vb6 I did this
Private sub TGDB_FetchRowStyle(...)
dim RStemp as recordset
RStemp = RSMaster.clone
RStemp.bookmark = RSmaster.bookmark
if rstemp!somefiled = "something" then TGDB.rowstyle=something
SET RStemp=nothing
End Sub
And i don't know what to do in VN.NET
I use DataTable to fill the grid TGDB.SetDataBinding (DataTableName,
Nothing, True)
I can't find a example...
Thanks
--
You're not paid to think. A mindless worker is a happy worker. Shut up
and do your job!
- Tata Feudalac!
--------------------------------------------------------
http://www.fotozine.org/index.php?stranica=clan&uid=1352
http://www.thinkgeek.com/brain/gimme.cgi?wid=81d35dc8f
http://groups.google.com/group/fejkneraddangub
-------------------------------------------------------- Tag: Setup and deploy project in Visual Studio 2005 Tag: 120723
How To: Setup project Custom dialog boxes
Hi
In my setup project I need a custom dialog box containing a drop down
list box. Since this is not avaialble from standard user interface
dialog boxes that visual studio supplies, I am using Installer class.
This installer class inturn displays the custom dialog box i need. but
the problem is this custom dialog box is displayed as a popup window
during installation. But I want this custom dialog box to be shown as
one of the wizard pages during installation.
Has any one done this before? I know some few setup programs that do
this. However I am not sure that they used visual studio setup and
deployment project to create their setup programs.
Thanks
Gancy Tag: Setup and deploy project in Visual Studio 2005 Tag: 120721
Drawstring inserts spurious linebreak after character #132
I am using DotNet v1.1.4322.
This issue can be replicated with various text fonts - but is easiest to see
using WingDings.
1) Create a string which includes character #132
2) Draw it to a Graphics object with DrawString
S := #130+#131+#132+#133+#134+#135+#136+#137+#138+#139;
F := System.Drawing.Font.Create('WingDings', 16);
G.DrawString(S, F, Brushes.Black, 0, 0);
The output always wraps immediately after character #132, regardless of font
size, StringFormat settings, etc.
Is this a bug in DrawString, or is it due to some other setting of which I
am not aware?
Does it happen in DotNet v2? Tag: Setup and deploy project in Visual Studio 2005 Tag: 120720
ControlToValidate = Page?
Is there a way to make a custom validator that will act as a client
side (run time) validator for the entire page (.aspx)? I would like to
show a short validation message without having to postback to check if
the page.Isvalid = true. Tag: Setup and deploy project in Visual Studio 2005 Tag: 120712
.Net x64 / x32 incompatibility "is ambiguous in the namespace"
I ma trying to compile my XP x32 build after reboot into XPx64 as native x64
application. In VS2005 I changed my VB.net configuration to x64 and changed
the reference path to point to c:\windows\microsoft.net\framework64 (before
it was without the 64). Most things fell into place after these changes, but
several classes are no longer available in the interllisense completion list
and they are listed as errors as well. Even simple things such as
Debug.Assert() are no longer available. Sample error: 'Debug' is ambiguous in
the namespace 'System.Dosagnostics'.
Do those classses really not exist as 64 bit version?
What is the best way to resolve this?
Thanks, Ingmar Tag: Setup and deploy project in Visual Studio 2005 Tag: 120710
Seemingly simple regex question
I'm using the following regex expression where "searchword" is a string:
string regrexstr = @"( |^)\b" + searchword + @"+( |\b)"
My goal is to use this string to ultimately replace all occurances of
searchword as long as:
a) it has a preceeding space or it's the beginning of a line AND
b) it is suffixed with a space or a newline character
The problem right now is that using the above string and calling
Regex.Replace also replaces the leading/trailing spaces. I want the spaces
to count during the match, but be ignored during the replace. Is that
easily do-able?
I'm probably going about this the wrong way. In short, I want to do a word
replacement throughout a large file.
TIA!
-sb Tag: Setup and deploy project in Visual Studio 2005 Tag: 120706
Wanted: .NET Infrastructure book
Hi folks,
I work in IT, but on the infrastructure/engineering side. At work I'm now
being asked to design infrastructure solutions to support new .NET
applications. Typically, this infrastructure must be highly available and
support things like load balancing etc.... the only problem is I don't have
a thorough understanding of how to accomplish this. Is the infrastructure
tiered? How does the presentation layer talk to the middleware? These are
the types of questions I have.
I want to get a grounding how infrastructure wraps around the .NET framework
and how enterprise solutions are designed. Can anyone point me in the right
direction? eg... a good book or the like.
cheers, froowstie Tag: Setup and deploy project in Visual Studio 2005 Tag: 120705
Error with SqlSmlCommand
I am attempting to read XML data directly from a table in SQL Server
2000 using VB.Net 2003. When I run the code shown below, I get the
following error:
"SQLXML: invalid direct object (dbobject) query -><-"
I applied SqlXml 3.0 Service Pack 3 to both client and server. My
project references Microsoft.Data.SqlXml. Client is Windows XP Pro,
Server is Windows Server 2003 with SQL Server 2000. All service packs
and patches are current.
'----------------------------------------------------------------------------
Imports Microsoft.Data.SqlXml
Private Sub ReadXML()
Dim CS As String = "Provider=SQLOLEDB; Data Source=MyServer;
Initial Catalog=MyDB; User Id=MyUser; Password=MyPassword"
Try
Dim cmd As New SqlXmlCommand(CS)
cmd.CommandType = CommandType.Text
cmd.CommandText = "Select parent_ID from tblData _
FOR XML AUTO, ELEMENTS"
Dim xr As XmlReader
xr = cmd.ExecuteXmlReader '<------Error happens here
xr.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
End Try
End Sub
Can anyone figure out what I'm missing? Specifying column names in the
SQL also has no effect. I tried adding a root tag to the command using
the code below before executing the reader but it had no effect.
cmd.RootTag = "xmlns:sql=""urn:schemas-microsoft-com:xml-sql"""
Thanks,
John Tag: Setup and deploy project in Visual Studio 2005 Tag: 120701
PublicKey of System.Xml assembly
I need to make some classes in my assembly internal. I am using XMLSerializer
to serialize the objects of my classes. XMLSerializer cannot access my
internal classes. So I am thinking that adding System.Xml as a friend would
make my internal classes visible to XMLSerializer.
Adding System.Xml as a friend requires public key of the System.Xml assembly
specified. I can get the PublicKeyToken, but not the public key. I tried
following code also but no luck, it just returns 16 bytes (0000000040000000).
Assembly assembly = Assembly.GetAssembly(
typeof(System.Xml.Serialization.XmlSerializer));
byte[] pubkey = assembly.GetName().GetPublicKey();
Any ideas to get the public key of System.Xml assembly, it doesn't have to
be programatically.
Thanks! Tag: Setup and deploy project in Visual Studio 2005 Tag: 120700
WSS document event handler that will use System.web.mail sendmail
I am not using vs studio 2.0 I have 1.1
I have a WSS document event handler that works on a document insert, I want
to use system.web.mail to get to sendmail and put out an email. Document
event handlers are written with C# class library which does not allow me to
reference system.web.mail. I use use the interface with a web control and
reference the web control from within the document event class but when I
compile I get
c:\Documents and Settings\cmello\My Documents\Visual Studio
Projects\SISWorkflow\bin\Debug\SendMailCtrl.dll Referenced class
'SendMailCtrl.DocLibSendMail' has base class or interface
'System.Web.UI.WebControls.WebControl' defined in an assembly that is not
referenced. You must add a reference to assembly 'System.Web'.
I am thinking that is because in the SendMailCtrl dll there is a method that
uses SendMail and the reference to System.web.mail inside the web control
project is the reason that I cannot create a new instance of the web control
object in my C# document event library and call the method to send mail.
Help!! please I need to have a document library insert event send my custom
email to users who have alerts set without having to go into CAML and rewrite
the alert notification AARGH
--
cindy Tag: Setup and deploy project in Visual Studio 2005 Tag: 120695
StatusStrip layout
Greetings,
We are using StatusStrip to present various status messages, progress
bars, and so forth, throughout the user experience. We are finding,
however, that the layout leaves something to be desired, or we do not
have a good understanding of how layout is managed.
In particular, how does one designate specified regions for one text or
another or a progress bar? For example, without things hiding and
moving around? Is there a way to do this, something like what taskbar
does for us, or what one might find in Microsoft Word or Excel?
Thanks in advance.
Best regards,
Michael Tag: Setup and deploy project in Visual Studio 2005 Tag: 120691
Setting StringBuilder.Length not behaving per documentation
Perhaps this has been discussed elsewhere - if so, I couldn't find it.
The StringBuilder.Length property is explicitly documented as padding the
length with spaces if .Length is set to a value greater than the current
length. I'm hoping to get this behavior. However, when I set .Length to
something greater than the current length, the padding is done with null
characters ('\0'), not spaces. Is this the actual intended behavior (and the
docs are wrong) or a bug (and the docs are right)?
Any help in this would be appreciated. Thanks,
Donnie Tag: Setup and deploy project in Visual Studio 2005 Tag: 120686
Serialization Files Compatibility
I pciked up a project and am encountering several deficiencies on the
architecture.
My current concerns are the persisted data files that are written and read
through dynamic reflection and Serialization/De-Serialization. The
application has been going on for a while and is using .Net Framework 1.1.
They intend to switch to .Net Framework 2.0. If data files are saved through
an application saved on .Net 1.1 and later attempted to read through an
application running on the .Net 2.0 Framework, will it work? Also, this is
a number crunching application. There will be versions running on 32-bit
machines and 64-bit machines. Can Serialized data files be shared between
versions of the application running on the 2 platforms?
--
Ed Reyes Tag: Setup and deploy project in Visual Studio 2005 Tag: 120685
ClickOnce - Setting up a staging and production versions
I want to be able to install a staging version and production version on my
desktop of a ClickOnce application. I have created two separate virtual
directories on a web server. I changed the product name in the Publish -
Options dialog. When I install from the staging location, it overwrites my
production version that was installed from the production virtual directory.
Is there a product guid that is maintained?
Any way to accomplish this? Tag: Setup and deploy project in Visual Studio 2005 Tag: 120680
modify the keyboard queue
Hi
I need to be able to modify the keyboard queue and I have no idea how to do
it. I have a windows app (C#) that should login to another application when
pressing a login button. I have no access to the other application so I would
like to add the username and password to the keyboard queu and login to the
third part application that way.
Is this possible to do? Does anyone knows where to find some information
about this area?
Thanks a lot
Julia Tag: Setup and deploy project in Visual Studio 2005 Tag: 120679
creating a compile time error... is it possible?
Hi,
I'd like to create a compile time error in my class... maybe there's a way
already built in in the framework so I can achieve what I want... I have 2
constructors in my class. One of them has mandatory parameters, I mean, they
should not be null nor empty (for strings). So I'd make the validation in
the constructor and generate a compile-time error if the validation does not
match...
Is there a way to achieve this or to specify mandatory parameters? (I'm
using C#)
thanks
ThunderMusic Tag: Setup and deploy project in Visual Studio 2005 Tag: 120677
http://www.ringtones-dir.com/get/ ringtones site.
http://www.ringtones-dir.com/get/ ringtones site. Download ringtones FREE, Best free samsung ringtones, Cingular ringtones and more. From website . Tag: Setup and deploy project in Visual Studio 2005 Tag: 120676
http://www.ringtones-dir.com/get/ ringtones site.
http://www.ringtones-dir.com/get/ ringtones site. [URL=http://www.ringtones-dir.com]ringtones download[/URL]: Download ringtones FREE, Best free samsung ringtones, Cingular ringtones and more. [url=http://www.ringtones-dir.com]samsung ringtones[/url] From website . Tag: Setup and deploy project in Visual Studio 2005 Tag: 120675
Querying Active Directory
Hi
Can anyone tell me, how can I search for Domain Administrators on a network.
What I mean is by using DirectorySearcher I can search for normal users,
which goes something like
DirectorySearcher ds = new DirectorySearcher(new DirectoryEntry());
ds.Filter="objectCategory=User";
ds.FindAll();
Similarly how can I search for administrative accounts?
Thanks in advance
Vikas Tag: Setup and deploy project in Visual Studio 2005 Tag: 120666
using SerialPort in a service
Hello,
Someone can tell me why I dont get serial port events in a Service, I
created a separate Thread to open the port but no events are coming up (the
same happens when I use the timer component, using the System.Timers.Timer
it works fine)
tnx in advance
Jean Paul Tag: Setup and deploy project in Visual Studio 2005 Tag: 120665
ActiveX controls not painted on a TabControl of a UserControl
Hello,
I'm trying to build an application using some ActiveX controls
(Microsoft Web Browser and Windows Media Player).
I first put a tab control on a form, with activex controls on tab
pages. Everything went ok on the different tab pages.
I came to a problem when i placed the tab control on a user control
instead of placing it directly to the form, With the user control on
the form, only the activex controls on the first tab page would
display, activex controls on other tab pages are just not painted.
Does someone know where the problem comes from ?
Thanks for your help,
Valerie Tag: Setup and deploy project in Visual Studio 2005 Tag: 120664
startup times woes...
Hi All!
I try to understand and improve my application cold start.
I already load as little as possible in the Main().
Now I have a test which gives strange results, and I try to understand what
it means.
test 1:
====
I reboot, launch a small .NET executable, which takes 7 seconds, and launch
my application, which takes 30 seconds.
test 2:
====
I reboot, launch my application, which takes 70 seconds.
Now this doesn't add-up, why?
Any idea what's going on?
I'm thinking to write a small "QuickStart" application which "initialize"
everything. How should it work? Tag: Setup and deploy project in Visual Studio 2005 Tag: 120659
Sewin is a joke
I am not that much job less to follow a suit like that and of course i ll
teach them, but its not a matter of teaching its a matter of rules and
morals and ya are right that its nothing unwanted and i didnt know that
spamc created for targeting newsgroups especially msnews that most of the
material is text and the content is thechnical Tag: Setup and deploy project in Visual Studio 2005 Tag: 120655
one decimal point in text box
Hi all,
C# newbie after migrating from VB. I wish to have only valid numbers
entered into a txtbox . i.e only one decimal point.
///////////////////My VB code for this is:
Private Sub txtGcost_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 48 To 57, 8
Case 46
If InStr(txtGcost.Text, ".") > 0 Then
'Decimal point already there.
KeyAscii = 0
If Left(txtGcost.Text, 1) = "." Then
txtGcost = "0."
End If
End If
Case Else
KeyAscii = 0
End Select
End Sub
///////////////My C# code is:
private void txtCost_KeyPress(object sender, KeyPressEventArgs e)
{
{
const char Delete = (char)8;
const char dot = (char)46;
string check4dot = ".";
string searchstring = txtCost.Text;
int checkit = searchstring.IndexOf(check4dot);
if (checkit >1 )
{
e.Handled = !Char.IsDigit(e.KeyChar) && e.KeyChar
!= Delete && e.KeyChar != dot;
Which works fine, except for not allowing no more than one decimal
point,
Thank in advance Tag: Setup and deploy project in Visual Studio 2005 Tag: 120654
when serializing XML, how to NOT save type's fullname
I have a strongnamed application. In that assembly, I also have a
Settings class that's XmlSerializable.
<xmlSerializerSection type="MyApp.MyAppSettings, MyApp">
<MyAppSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- some settings... -->
</MyAppSettings >
</xmlSerializerSection>
Using June 2005 Enterprise Library's
ConfigurationManager.WriteConfiguration, I save user changes to the
settings. However, it serializes the settings with the fullname of the
type:
<xmlSerializerSection type="MyApp.MyAppSettings, MyApp,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=1234567890ABCDEF">
<MyAppSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- some settings... -->
</MyAppSettings >
</xmlSerializerSection>
This is problematic when I roll out updates to the application. When I
roll out version 1.0.1.0 of the application,
ConfigurationManager.GetConfiguration() fails because the user's xml
settings refer back to 1.0.0.0. If the xmlSerializerSection's type
contains only the type name and assembly, everything works great (i.e.,
it loads the type from 1.0.1.0).
Binding redirect from 1.0.0.0 to 1.0.1.0 doesn't seem to work.
I have the following options:
1. Don't make the application strongnamed.
2. Keeps the settings class in a seperate assembly.
I'm not crazy about either options. When serializing xml, is it
possible not to save the type's fullname?
thanks in advance.
JT Tag: Setup and deploy project in Visual Studio 2005 Tag: 120653
Block-level CD-ROM access
Hello all,
Is there a method within the .NET Framework to access
a CD-ROM device at the block-level? (IE to create a raw
copy of a disc for archival purposes)
Thanks,
- Scott Tag: Setup and deploy project in Visual Studio 2005 Tag: 120651
custom paging using oracle procedure in .net C#
Hi,
I am developing a oracle procedure for using custom paging in one of
the project where in we are getting thousands of records into cache. To
avoid this, i am creating orcale procedure to use custom paging for
data grid. Can any one please provide some inputs, if you have done
something like this.
Regards,
netdev Tag: Setup and deploy project in Visual Studio 2005 Tag: 120649
.Net Equivalent to a VBS Script?
Is there a way to build a .net file in C# which will JIT compile and execute
when double-clicked (a la the old .vbs scripting approach)? This would just
be a nice, convenient way for me to do some scripting where I don't want to
have to build a whole project and application.
Alex Tag: Setup and deploy project in Visual Studio 2005 Tag: 120647
Bogus "Cannot find the assembly" exception
I have a very strange error; an ASP page invokes a method through .NET
remoting which returns an exception as an output parameter.
Unfortunately, no matter what exception the method returns, it appears
as a different one ("Cannot find the assembly") to the ASP page.
To clarify, I have an interface class called called IGetBoardInfo,
which provides the interface for one method.
I have a Windows service that exposes (through remoting) a class called
GetBoardInfo, which implements the interface. It uses a class library
called SubComponent, which can throw custom exceptions.
Finally, an ASP webpage instantiates the GetBoardInfo class and calls
its method. When it does, the GetBoardInfo class calls SubComponent,
which throws a SubComponentException, which is returned via output
parameter back to the ASP page. The problem is, which the ASP page
tries to display the exception's message, this is the exception that
appears:
"Cannot find the assembly 'SubComponent', Version=1.0.1.2,
Culture=neutral, PublicKeyToken=null."
This is not the exception that was actually thrown. How is the real
exception getting obscured, and this other exception being shown
instead?
Here is some much-simplified code that illustrates what I'm talking
about:
The interface class is specified like this:
namespace TE.Service.IGetBoardInfo
{
[Serializable()]
public struct BoardInfo
{
public long m_ID;
public long m_siteNumber;
}
public interface IBoardInfo
{
BoardInfo[] GetBoardInfo(out Exception o_exception);
}
}
The service itself is called GetBoardInfoSvc, and uses a C# class
library called SubComponent.
public class BoardInfoRpcServer : MarshalByRefObject, IBoardInfo
{
public BoardInfo[] GetBoardInfo(out Exception o_exception)
{
o_exception = null;
BoardInfo[] info = null;
try
{
// this line throws a SubComponentException
info = SubComponentNamespace.SubComponent.GetBoards();
}
catch(Exception e)
{
o_exception = e;
info = null;
}
return info;
}
}
The webpage has code that looks like this:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
ystem.EventArgs) Handles MyBase.Load
Dim url as String = "tcp://myComputerName:555/GetBoardInfo.rpc"
Dim obj As IBoardInfo = Activator.GetObject(GetType(IBoardInfo), url)
Dim exBoardInfo As Exception
Dim strBoards() As BoardInfo = obj.GetBoardInfo(exBoardInfo)
' At this point, exBoardInfo is "Cannot find the assembly
'SubComponent'",
' which is not the exception that was originally thrown.
End Sub Tag: Setup and deploy project in Visual Studio 2005 Tag: 120646