vb.net

ado.net managing connections

Hi, I'm populating a listview with a list of databases on a selected SQL instance, then retrieving a value from each database (It's internal product version, column doesn't always exist) I'm calling the below function to populate the second column of the listview: item.SubItems.Add(DBVersionCheck(serverName, database.Name)) Function D...

Why C# IntelliSense is delayed compared to VB.NET?

In VB.NET projects, errors are highlighted immediately after cursor leaves the line. IN C#, I have to wait several seconds for IntelliSense to highlight it. Also, C# version doesn't show all project errors in "Errors List", unless you start to build it. Actually, it seems to work differently in every way. Is it possible to adjust that be...

how do i return arraylist from a function?

Hi guys, I learnt example from msdn to populate a listbox control with arraylist. http://msdn.microsoft.com/en-us/library/1818w7we(v=VS.100).aspx I want to create a function which will give return the USStates arraylist and use the returned value as datasource for listbox1 Dim USStates As New ArrayList() USStates.Add(New USSta...

Need Language/Career Path Advice

I am interested in getting a few Microsoft Certs and I am currently facing the option for .NET Framework app development language. My choices are C++, C#, and Visual Basic. I have some experience with C, Java, and Visual Basic .NET primarily through college. I honestly would like to know what the best would be for developing stand-alo...

Restoring database with SMO - Reporting progress problems

I'm using the below to restore a database in VB.NET. This works but causes the interface to lockup if the user clicks anything. Also, I cannot get the progress label to update incrementally, it's blank until the backup is complete then displays 100% Sub DoRestore() Dim svr As Server = New Server("Server\SQL2008") Dim res As Rest...

What is wrong with this connection string?

Can any one help me with this connection string. I can't manage how to fix. Dim constring As String Dim con As SqlCeConnection Dim cmd As SqlCeCommand constring = "(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + \\database.sdf;Password=pswrd;File Mode=shar...

How to localize HeaderText in GridView or validation controls?

I cannot figure out why HeaderText or validation controls always fallback to default culture - even though rest of the controls are in correct culture. I have a GridView with HeaderText specified in this way> <asp:BoundField DataField="totalSales" HeaderText="<%$ Resources:Strings,TotalSales %>" /> In the same way I have validation c...

Is it possible to style text in a richtextbox at design time?

I have a System.Windows.Forms.RichTextBox that I wish to use to display some instructions to my application users. Is it possible to set some of the text I enter at designtime to be bold? Or do I have no option but to do it at runtime? ...

How to expose information about a running .NET exe?

I have a .NET exe that I wrote and it has a couple properties that I made public and want to expose. I want to shell this exe (Process.Start()) and then somehow reference this exe and get access to these public properties. These properties expose information about the running exe. I know how to shell to the exe. And I know how to add a...

Dataset and Hierarchial Data How to Sort

This is probably a dumb question, but I've hit a wall with this one at this current time. I have some data which is hierarchial in nature which is in an ADO.NEt dataset. The first field is the ID, the second is the Name, the third is the Parent ID. ID NAME Parent ID 1 Air Handling NULL 2 Compressor ...

Ignore errors when scanning for files in C:\

I am trying to search the C:\ drive for all files with a certain extension. I am using the following code which is working fine, however when it encounters an error the whole process stops rather than continuing with the scan. (running in backgroundworker, hence the invoke) Private Sub ScanFiles(ByVal rootFolder As String, ByVal fileExt...

How do I query table data only for the current user's ID (VWD asp.net 3.5) ?

I'm using the Details View control of VWD asp.net 2008 I have a users database table. One of the columns contain the "uniqueidentifier" user's profile ID, created by VWD (from the automatic profiles table). From my table, I would like to select only the data pertaining to the logged in user. How do I get the current unique user ...

In VB.NET how do you specify Inherits/implements on a generic class with multi-constraints

When I write the following statement in VB.Net (C# is my normal language), I get an "end of statement expected" referring to the "Implements" statement. <Serializable()> _ <XmlSchemaProvider("EtgSchema")> _ Public Class SerializeableEntity(Of T As {Class, ISerializable, New}) _ Implements IXmlSerializable, ISerializable ... End Class ...

Create Access databases programatically through vb.net

Let me preface this by saying that I know this is a stupid way to go about this, but it needs to be handled in this way. I need to make an application that from a master database creates a number of access database files (tables of a larger db), then these are manually given to users who fill in data, the database files are emailed back...

how to download page from source code

i need to download page from source code..for example <span id="businessNumOnMap" class="resultNumberOnMap" style="display:none;"></span><span><a href="/len/aapproximatch%20search/285295.php" onclick="loadBusinessInfo('0', '285295'); return false;" class="businessName">Cellini's Italian Restaurant</a> i want to download the "/len/aapr...

Why compressed xps are corrupt?

compressed xps documents do not pass isxps.exe test and do not display in xpsviewer. i'm using Windows 7 and vs2010. Dim ms = New MemoryStream() Dim P As Package = Package.Open(ms, FileMode.Create, FileAccess.ReadWrite) Dim DocumentUri As Uri = New Uri("pack://document.xps") PackageStore.AddPackage(DocumentUri, P) Dim document As XpsDo...

Function chaining depending on boolean result

This is just an efficiency question really.. I'm interested to know if there is a more efficient or logical way that people use to handle this sort of scenario. In my asp.net application I am running a script to generate a new project my code at the top level looks like this: Dim ok As Boolean = True ok = createFolderStructure() ...

VB.NET - Find a Substring in an ArrayList, StringCollection or List(Of String)

I've got some code that creates a list of AD groups that the user is a member of, with the intention of saying 'if user is a member of GroupX then allow admin access, if not allow basic access'. I was using a StringCollection to store this list of Groups, and intended to use the Contains method to test for membership of my admin group, ...

Displaying multiple Reports in a single report viewer

Hi , i want to know is it possible to bind my all crystal reports to a single reportviewer, somewhat in tabbed view or treevie. If tabbed then visible through navigation button. If yes then how? any help would be highly appreciated. Amit Ranjan ...

Session Timeout in ASP.NET

I have written a page with an iFrame that basically cycles through a series of internal pages on our server displaying daily activity for our company. The problem I think is that it sporadically loses its session and redirects back to the login screen to keep losing its session which is the default behavior for anyone on our site trying...