I used
http://sqliteadmin.orbmu2k.de/
to create my sqlite db file. I created it as a sqlite db version 3 file.
When I go to open the connection
Dim Connection As New SQLite.SQLiteConnection(DATABASE_FILE_LOCATION)
Connection.Open()
I am getting this exception on the Open() call
"File opened that is not a database file
file is enc...
I am trying to create a list of all virtual directories within an IIS site. However, I have found that trying to do this varies dramatically in the older versions of IIS. In IIS 7 this is a relatively easy task via C# but I can't seem to find a good method for doing this in IIS 6 and 5.
I have tried using the System.DirectoryService...
The vb.net "WithEvents" syntax is very useful, but if a WithEvents field which references a long-lived object is not nulled out, it will often constitute a memory leak.
Is there any easy way for a Dispose routine to have vb.net automatically clear out all WithEvents fields and unsubscribe them?
I've figured out a nice way to wrap the c...
Through COM, one can potentially gain absolute control over a target system. For example: using javascript's ActiveXObject object in IE, one can create certain objects which were designed to have direct access or interaction with system properties and files. One would think common sense dictates users disable ActiveX features in IE imm...
Can one client call a public property within a VB.NET module and see the value of that public property changed by another client accessing it at the same time?
Example:
Client 1 calls
Public Module DataModule
Private theDateTime As DateTime = GetAdjustedDateTime() //initial TZ value
Public Property GetSetDateTime() As DateTim...
Visual Studio comes with Wizard that converts vb6 code to vb.net. Is there are any way to call this conversion via code?
...
Dim rowChinaVisa As DataRow
CodeRush is suggesting that I change this line
If rowChinaVisa("sex").ToString = "M" Then
to:
If String.Compare(rowChinaVisa("sex").ToString, "M", False) = 0 Then
I prefer how the orig line reads, but I am wondering if the recommended line is more efficient. Perhaps for LONG strings only?
...
Is one able to compile VB 6 code in Visual Studio.NET ? In other words, is it backwards compatible with older VB code?
Since I know there is a difference between managed code (.NET) and unmanaged code, I am wondering if Visual Studio.NET is able to compile unmanaged code as well?
Kind regards,
Kris
...
Hi all,
I want to install my app or (just access db)to AppData folder to enable write for it.
so, how can I do that in setup project.
Is there just parameter or should I wirte custom action.
Thx.
...
I have an SqlCommand with parameters. Due to some external requirement (see PS), I need one T-SQL string instead, i.e., I need ... @parameter ... replaced by ... the-value-of-@parameter-encoded-correctly ... (e.g. O'Brien --> 'O''Brien', 02 Mar 2010 --> '20100302', 3.5 --> 3.5).
I know that I could home-brew such a solution quite easil...
If I create a new class library project in VB.NET, I can create subfolders (a la C#), add WinForm objects to these subfolders, and then specify a namespace:
Namespace Sub1.Sub2
Public Class SomeForm
Public Sub New()
InitializeComponent()
End Sub
End Class
End Namespace
This resolves as ProjectRootN...
Function f(ByVal x As String, ByVal y As Integer, ByVal z As Integer, ByVal w As Integer, ByRef t As String) As String
If Length(x) < w Then // Definition for Length below
Return t
End If
If y = z Then
t = t + SubStr(x, w, 1) // Definition for SubStr below
z = 1
El...
I have an assembly installed to the GAC. We will always only have one version of this assembly. I have created a setup project to install this assembly to the gac. What I want to happen is for the old version to be removed from the gac before installing the new one. I have done the following:
Set the RemovePreviousVersion property o...
I have a method, that returns a group of accounts
Public Shared Function GetAllNotesByUser(ByVal UserID As Guid) As Account (??)
Using db As New MyEntity
Dim query= (From A In db.Account _
Where A.aspnet_Users.UserId = UserID _
Select A)
Return query
End Using
End Function
...
I am doing a internet cafe sweepstakes slot game in vb.net. I want to show the objects based on the payout and the prize money for paylines in the slot game. I tried using MT algorithem but it basically random number based. the final output should not be radom.
Inputs
Points Ex. 18 or 50 (2 entries) 9 or 25 (1 Entry)
prize (from datab...
This seems really simple, but for some reason Im stumped..
Im dynamically generating an HTML Select Box, lets call it myselect. Im creating this select box based on some database values Im generating an HTML Select Box.. almost like a string that Im just spitting out to the page. So it's never a control in the codebehind, just part of a...
I found this really cool page that allows you to hook up facebook into your site: See here
<iframe id="MyIframe" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.EXAMPLE.com%2F&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=recommend&amp;colorscheme=light&amp;height=21" s...
We use LINQ to SQL extensively, and one of the biggest performance pitfalls we've run into is situations where a query can't be converted to SQL, and so an entire database table gets loaded into memory and the query performed by .NET. For example, this query
Dim Foo = (From c in Db.Contacts Select c Where c.ContactID=MyContactID)
tran...
I have a form with about 40 checkboxes. Once a checkbox is checked, the div control's property should be changed from "none" to "block" or vice versa. I don't get an error, but the checkedchanged event isn't handled. Here is the markup:
<tr>
<td class="sectionSubHeader lightgrey">
<asp:CheckBox ID="chkbxCOMAEFund" AutoPostB...
This LINQ to SQL query
From g In Db.Context.Current.Groups
Select g.GroupID
generates this SQL:
SELECT [t0].[GroupID]
FROM [dbo].[Groups] AS [t0]
But this query
From g In Db.Context.Current.Groups
Select g.GroupID, g.MemberCount
generates this SQL:
SELECT
[t0].[GroupID], [t0].[Title], [t0].[Description], ...
-- 24 more f...