vb

Multiple infowindows - tearing my hair out

Ok, I'll admit I'm nowhere near the best programmer on the planet - and I'm used to the answer staring me right in the face but not making sense of it. Problem I need to display multiple markers on a map, each with their own infowindow. I have created the individual markers without a problem, but don't know how to create the infowindow...

Violation of PRIMARY KEY constraint 'PK_

hi am trying to write a code in which i need to perform a update but on primary keys how do i achieve it i have written the following code: kindly look at it let me know where m wrong Protected Sub rgKMSLoc_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgKMSLoc.UpdateCommand Try ...

automatic id generation which is a primary key

in vb.net while entering a new entry i want to assign a record a unique id like in case of numeric i do this way Dim ItemID As Integer KAYAReqConn.Open() SQLCmd = New SqlCommand("SELECT ISNULL(MAX(ItemID),0) AS ItemID from MstItem", ReqConn) Dim dr As SqlDataReader dr = SQLCmd.ExecuteReader If dr.HasRows Then dr.Read() ItemID ...

ActiveX control loading but not activating correctly (only when using in Reg Free COM)

I have an ActiveX control (created using C#) that I am adding to a form in Visual FoxPro using late binding. It works without problems when I register the control. I want to use reg free COM and created necessary manifest files. Now it load and displays in an inactive state until I double click or programatically activate it. I don't t...

Simple syntax problem null check datatable / gridview asp.net vb

I have this code: Dim Result As New DataTable DataAdapter.Fill(Result) 'bind data to visible surname/name grid If Result.Rows.Count = 0 Then NoInputBottom.Text = "No Results. Please widen your search criteria and try again" NoInputTop.Text = "No Results. Please widen your search ...

Transfer table from one database to another?

Hey all i am working at my project where it collects information from two database, one is supplied by the program lets name it DB Y and the other supplied by the user lets name it DB X , now i have an query that depends on companies which is on DB x so i want to transfer this table from DB x to DB y at run time and also checks if the...

How do I get events to execute on the "main thread"

I have 2 classes, one is frmMain a windows form and the other is a class in vb.NET 2003. frmMain contains a start button which executes the monitor function in the other class. My question is, I am manually adding the event handlers -- when the events are executed how do I get them to excute on the "main thread". Because when the toolti...

Format Document (Ctrl+K,Ctrl+D) equivalent in Visual Basic 6

Is there any equivalent of the VS7/8/9/10 Edit -> Advanced -> Format Document (Ctrl+K,Ctrl+D) function in the Visual Basic 6 IDE? I've inherited an old codebase and it is messy in places so I'd like to tidy it up. ...

How do I make a docstring in VB.NET?

Hi, I'm writing a .dll in Visual Basic. When writing code in Visual Studio if I do something like Console.WriteLine( it will pop up a tooltip with a bit of documentation for the function. Is it possible to write something in my function/sub that would provide that information to Visual Studio? Thanks ...

how run Access 2007 module in Vb6?

I have created a module in access 2007 that will update linked tables, but I wanted to run this module from vb6. I have tried this code from Microsoft, but it didnt work. Sub AccessTest1() Dim A As Object Set A = CreateObject("Access.Application") A.Visible = False A.OpenCurrentDatabase (App.Path & "/Data...

AxShockwaveFlash Objects communicateing togther VB

I'm having a problem, I have two different AxShockwaveFlash objects that normally communicate together in a web browser, in my VB 2010 project they don't seem to be able to talk to each other. Does anyone know how to solve this? ...

Speech Recognition on Visual Basic 6

There is a way to intagrate Speech Recognition on proyects of visual basic 6 ? ...

Parse files in directory/insert in database

Hey there, Here is my dillema... I have a directory full of .txt comma delimited files arranged as shown below. What I want to do is to import each of these into a SQL or SQLite database, appending each one below the last. (1 table)... I am open to C# or VB scripting and just not sure how to accomplish this. I want to only extract and im...

Visual Studio Conversion Suite

I have this as my conversion program for the "Length", how can I do it the simpliest way instead of keeping the if, elseif, else too much, i do not have much experience and trying to improve my programming skills on visual studio 2008. Basically, I get annoyed with the formulas because I don't know if it is right, I use google but doesn...

Protect some pages from direct access ASP.NET

Hey, I have a ASP.NET page called admin.aspx that needs to be protected from direct access. I want it to be accessed only when the user enter his name & password in another page called login.aspx I'm working in ASP.NET with Visual Basic .NET 2008, and I have no idea how to do it. Can you help me doing it ? ...

Compiling a click-once app that requires administrator?

Hi, a lot of my programs require the ability to write files to the hard drive. When I first made these programs for XP they worked great. Now I'm less ignorant about UAC (got a new laptop recently). And for future customers...I've noticed the potential for a LOT of annoying error messages....and quite frankly if the program can't write d...

What is the best way to learn VB/VBA?

I have wanted to learn VB and VBA for a long time. My school offers a coarse, but it doesn't fit with the rest of my schedule. It will be my first programing language. I was considering using the textbook my school uses (An introduction to programing using visual basic 2008, but I wold get the 2010 version), but I was wondering if there ...

Code optimization on minutes pr hour calculation

Hi All, The following code takes a timeframe in minutes since midnight and creates an array with minutes pr hour. But, it's slow. Any better suggestions out there? (no, changing language is not an option :-) ) Const clDeparture As Long = 123 Const clArrival As Long = 233 Dim lHour As Long Dim lMinute As Long Dim...

Using C# and VB.NET in one solution

I'm busy on a small project to convert an Access2003 db to .NET. I am trying to integrate my functionality in an excisting project that is being used for Administration of some kind. The code in this project is vb.net. I started by setting up my Data Access Layer, which seems to work fine. I can make new web pages that acces the data I...

Idatareaders not returning values from database

In my codebehind I have this vb: Dim reader as idatareader = includes.SelectDepartmentID(PageID) While reader.Read Did = reader("departmentid") GroupingHeading = reader("heading") Folder = reader("folder") If reader("OwnBanner") Is DBNull.Value Then OwnBanner = Str...