I am using Visual Basic Express 2008 to make a simple game. I am trying to declare a dataset object and datatable but I'm getting a bizarre syntax error and I can't find a help reference.
Line A - I dimension GameTable as an Object
Line B - I instantiate the object
Line C - I edit data in the GameTable
Line D - I display the data in Visual Basic
Line C will crash in runtime if I don't do sometype of "New" declaration
Line B is my attempt at a "New" Declaration by I get an error message I don't understand - "Type Expected" - I think I have the syntax wrong here.
I have a query that pulls data from an ODBC linked table to a local table for later manipulation for a report. Our administrator has now required that this be done WITH(NOLOCK) I keep getting the runtime error 3257 syntax error in WITH OWNERACCESS OPTION declaration. I have tried to add it to the WITH but get the same error.
CurrentDb.Execute "INSERT INTO dbo_tblEvents_NEW SELECT dbo_tblEvents.* " & _ "FROM dbo_tblEvents WITH (NOLOCK)INNER JOIN DateRange1 ON dbo_tblEvents.DateCompleted = DateRange1.Date" & _ "WHERE (((dbo_tblEvents.UniqueActionID)=1110) AND ((dbo_tblEvents.ModifiedDate)<= " & dteEnd & "));"
if I created a new object like this Dim sqlconn As New SqlClient.SqlConnection(cs) and Dim sqlconn = New SqlClient.SqlConnection(cs) Whats the difference?
I am getting an error in above line says: objrpt is not declared it may be inaccessible due to its protection level I agree it may be inaccessible if the condition doesn't met - but here if it doesn't met it will take CrystalReport2 know ?
What is wrong with this Anonymous Object Initialize syntax?
If (Not row Is Nothing) Then Dim info As New CultureInfo(Conversions.ToString(row.Item("cultureId"))) With { _ .NumberFormat = New With {.CurrencySymbol = Conversions.ToString(row.Item("symbol")), _
I have a form called document_form. I have three variables: Dim Doc1, Doc2, Doc3 as Document_form How do I check if a particular form exists? I want to show Doc1. If it does not exist I have to first create it.
Something similar to: If Doc1 = Null Then Doc1 = new (document_form). End If
What's the best Object Browser / Syntax Training Manual? Looking for a good reference guide which helps me understand what I'm seeing with the object browser.
In an ASP.NET 3.5 VB web app, I successfully manage to cache an object containing several personal details such as name, address, etc. One of the items is CreditNum which I'd like to change in the cache on the fly. Is there a way to access this directly in the cache or do I have to destroy and rebuild the whole object just to change the value of objMemberDetails.CreditNum?The cache is set using:
Public Shared Sub CacheSet(ByVal key As String, ByVal value As Object) Dim userID As String = HttpContext.Current.User.Identity.Name HttpContext.Current.Cache(key & "_" & userID) = value End Sub
Anyone have VB.Net or VBA code to ascertain if an Excel Object is positioned over (Hiding) spreadsheet data?I have code to create/position a chart object. Where would I begin to determine if there is data "under" an object.
I've seen a lot of posts for how to do this in C#, but I'm working in VB and they don't work and I can't seem to get them to convert. Anyone know this? C# is something like: if (x is IEnumerable)
I am having an issue trying to figure this out. I am writing a script editor that uses tabs (a tab control) and I want to implement syntax highlighting. My issue is that every sample I can find on syntax highlighting uses
Private Sub RichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
How can rightfully declare these in VB.net , in my coding it's highligted errors on these declaration.
Dim excel As New Microsoft.Office.Interop.Excel.ApplicationClass Dim wBook As Microsoft.Office.Interop.Excel.Workbook Dim wSheet As Microsoft.Office.Interop.Excel.Worksheet
What is the appropriate declaration such as "ValueChanged" or "Click" for a NumericUpDown that will execute the code when I press enter. I already know that setting the "AcceptButton" property of the main form to a default button will not work, especially if I want a different button to be selected depending on which control I give focus.
PS: Is the syntax any different from Visual Basic 2010 Express than it is on Visual Studio 2012 RC (running in Visual Basic Mode)?
i have this code:Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]...
Error 1: Option Strict On disallows late binding.Im using visual basic 2010 express on a gateway laptop thats running Windows 7 OS How do i resolve this error?
I have a listbox and it it I am showing numbers.It should look like this (line by line) 1,2,3,4,5,6,7,8,9,10,11.....but is is showing it like this 1,10,11,...2,20,21...3,30...ow can I make it that it will show it in number order 1,2,3,4,5......
I want to select some rows from a sql express 2005 table. I am using this expression: "Starttime >= " & dtpStart.Value dtpStart is a DateTimePicker But I am getting this error: Syntax error: Missing operand after '14' operator.
Question: How to shorten this array creation ? I need to create an array of type ReportingService2005_WebService.Property with one property.
Something like:
Dim PropertyArray() as new ReportingService2005_WebService.Property(1)
I have to do this:
Dim PropertyArray As ReportingService2005_WebService.Property() = New ReportingService2005_WebService.Property(0) {} PropertyArray(0) = New ReportingService2005_WebService.Property
For some reason when i declare an array and set it to a certain amount of elements then under it specify the elements it works in VB 2005 but when i do it in VB 2008 it get : "declaration expected " and i get words underlined.
Public Class Form1 Dim words(20) As String words(1)="Computer" End Class