vb

Escaping non-ASCII characters (or how to remove the BOM?)

I need to create an ANSI text file from an Access recordset that outputs to JSON and YAML. I can write the file, but the output is coming out with the original characters, and I need to escape them. For example, an umlaut-O (ö) should be "\u00f6". I thought encoding the file as UTF-8 would work, but it doesn't. However, having looked a...

Why doesn't my conversion from C# to VB work?

The original code: public List<Contact> GetContactListEntityCompiledLINQ() { if (entities == null) entities = new CompanyEntities(); ObjectQuery<Contact> contacts = compiledQuery.Invoke(entities); if (NoTracking) contacts.MergeOption = MergeOption.NoTracking; return contacts.ToList<Contact>(); } My converted code: ...

VB support in Java 6?

I was checking Java language history in wikipedia, and this paragraph caught my attention: The current version, Java SE 6 (December 11, 2006) — Codename Mustang — is bundled with a database manager, facilitates the use of scripting languages (currently JavaScript using Mozilla's Rhino engine) with the JVM and has Visual B...

Debugging build errors in painfully nested VB .aspx file

I have an VB ASP.NET (.aspx) file that has deeply nested logic and I'm getting lots of build errors like "If must end with a matching End If" and "Do must end with a matching Loop". How do I begin to debug this beast to at least get it to build? ...

In Excel's VB, how do i create a routine that would constantly run in the background?

I am making a primitive database in Excel and need a routine to run in the background constantly. I will be able to fill in the actual actions it needs to do, but I don't know how to make something run independent of a key press or some sort of Macro. If someone can give me an example of code that runs independently which I can simply fi...

Binding results of a sql query to listbox

I am getting stuck on this problem. It seems simple but for some reason im having trouble. Here is what I have of the following: Try cn = New OleDbConnection("Provider=microsoft.Jet.OLEDB.4.0;Data Source=G:\Sean\BMSBonder3_0.mdb;") cn.Open() str = "Select Distinct BonderIdentifier From [Session]" cmd ...

Asp.net using oledb to export excel file returns empty excel file

Hello, I am using asp.net oledb to export information to excel file. I encounter problems when the information to export becomes too big, in this case the code I have given below, the excel file generated becomes an empty spreadsheet. If I changed the loop to 1123 for insertion of the rows. The generated excel file is fine, 1125 rows,...

How can I compare two dates in vbscript/ASP?

Using ASP classic, I need to somehow compare two dates with each other. How can I do this? ...

SQL IErrorInfo.GetDescription error.Brackets not working

I have the following code. I tried putting brackets around all the tables and parameters with no luck. The query works in Access though. Dim cn As OleDbConnection Dim cmd As OleDbCommand Dim str As String Dim dr As OleDbDataReader DataGridView1.Rows.Clear() Try cn = New OleDbConnection("Provider=microsoft....

exporting gridview contents to excel spreadsheet

Hi There, I have a gridvidew (GV2). I want the user to be able to export the contents of this gridview to an excel spreadsheet for offline processing. Here is my subroutine: Protected Sub ExcelButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExcelButton.Click Response.ContentType = "application/vnd.ms-e...

LineShape control drag n drop

This is the code which I am using for LineShape control drag n drop.LineShape control from powerpacks.dll I am not able to move the Lineshape control freely. Cursor is slipping while drag n drop . Any ideas? I have to move the lineshape control freely like lineshape control at design time with mouse cursor. Dim fdragging As Boolean =...

Find start and end XY coords of perpendicular line calculated from start and end XY coords of baseline

Using the following start and end point coordinate values of a baseline: X1 = 5296823.36 Y1 = 2542131.23 X2 = 5311334.21 Y2 = 2548768.66 I would like to calculate the start and end coordinates of a pendicular line that intersects the baseline at the mid-point. This intersecting, perpendicular line should extend at a given distance ei...

can't access indexer of a property in VB.Net

I have a property Cmd defined as follows Private _cmd As ADODB.Command Public ReadOnly Property Cmd() As ADODB.Command Get Cmd = _cmd End Get End Property However, when I try to use it like this: y = x.Cmd("abc") I get: Overload resolution failed because no accessible 'Parameters' accepts this number of argum...

VB 6: The project not be built because it references a project which does not have a binary compatibility file set.

I haven't done VB 6 development for nearly a decade. Any advice on how to deal with this? Microsoft Visual Basic The project 'ProjectB' can not be built because it references project 'C:\VSS\Foo\ProjectA\ProjectA.vbp' which does not have a binary compatibility file set. OK Help ...

Comparing trees in a treeview

I want to be able to iterate through a tree and compare nodes one tree to the nodes in another tree of the same format. EX: There are five categories. 1 - 5. Are all static and identical between both trees. In 1. All static values. So i need to just compare the values of the nodes there. In 2. This is comes from a KVP object and...

Is there a VB 6 to VB.net conversion guide?

While I used to VB 6 like the back of my hand, it has been a very long time I have never attempted to convert a large project. Are their any guides to help me along the process? ...

TAB separated txt file from Excel VBA/MACRO

Hey guys I need to make an excel file that has a some values in it..into a tab separated values text file.... solution 1 -i can save it as a tab separated text file..but the issue is it also saves the column headers which i dont need.Dont know how to change that ! solution 2--i have this code: Public Sub CharacterSV() Const DELIMI...

VB6 and ActiveMQ

Hi, how can I consume topics in ActiveMQ with VB6? Is there any other way besides using the REST API? ...

PDF Viewer Showing Last Page...

I have a asp.net app that writes a pdf to file. Then, later that file is opened into a window (standard acrobat reader) for viewing. No problems there. The weird part... The entire document loads as it should, but the Reader initially shows the last page in the document on the screen. The user must then scroll up to the first page. It...

MS Access 2003 - Radio button : click one, unselects another

So what VBA can i use to make sure that is radYes is clicked, radNo is unselected? Just a measure to make sure that if one is clicked then other cannot be Thanks! ...