I've inherited some code that has a Public Module for data access:
[Code]...
And all the pages call GetDataSet(sql). Am I correct is assuming that this is a bad idea? Worst case is that concurrent callers could get each others data?
i have encountered a problem, i want to access the data coming to the computer from the in-built bluetooth module of a computer on windows platform, this data has been sent by a remote bluetooth module say a by an autonomous device (just like a bluetooth mouse connecting to the computer). The to be sent is in the form of numbers and i need these to manipulate on the computer.
This is inside the Module separate from Form1 class as you can see right off the bat it's not a class and there is no reference to Form1.. how do I access Form1 without passing reference to make factory modules work like this.
I created a module procedure in a access database, but I am having trouble trying to execute it in VB. I thought perhaps I should create a similar module in VB, but that didn't workThen I tried a few obj codes, but hitting a brick wall left and right. Should I create a new class? or is there some other way?
I have a form called form1 which has a thread that runs a sub from a module.[code]...
Well from the module, there's a part where I have to update controls on the form1. Whenever I try doing it, it updates the value, but not the design. For example I write a delegate which makes label1.text = "111", while debugging, label1.text becomes 111, but it does not show it updated on the form design, it just stays at its default value.
I have a dynamically created CheckBoxList in a DotNetNuke module I'm building. When DNN creates the page, it prepends the control name with the moduleID and moduleName.
So, when I have "AddLicenseCheckBoxList" on the page, it becomes:
"dnn_ctr949_addRateGroup_AddLicenseCheckBoxList" depending on what the ModuleID and page name is (in this instance it's 949 and addRateGroup respectively). Now, I don't know what the name of the page or moduleID will be when this module is finished, so I need to make sure I am accessing the control my whateer name DNN gives it, and getElementById or getElementByName do not work even when using '<%= %>'.
So what I need to do is use Javascript or some VB to retrieve the checked values of the dynamically created CheckBoxList so that I can run an update on the database with those selected values. [code]...
I am trying to access a browser control in one of my forms from a module but keep getting an error. I attached a screen capture showing the code and the error balloon. The subroutine is public, and I am addressing the browser correctly. If I copy that same code into the "Main" form, and it works perfectly.
I failed at the title: it should be "access a function of a class from a module"Edit by Moderator: I've amended the title for you.I got a huge VBA program which opns an excel workbook.I want that if i press crtl + s excel dont calls his save function but my own written save-function.
I've got a console app with a sub main then i have a seperate class inside the module..i can't seem to update the public global variable from inside the class as i can't declare the variable as shared...
I was a vb6 user, done a few projects only with forums Now i am moving to vb.net(vb2010) and i have some trouble.Lets say we have a form(form1), a module(mod1) and a textbox on the form1.
i want to start a Sub (DoWork) in the module but in a new thread.
Dim Thread1 As System.Threading.Thread Thread1 = New Threading.Thread(AddressOf mod1.DoWork) Thread1.Start()
The DoWork sub does some stuff and when it's finished i want to change the text of a textbox1 in the main form and start another sub (DoWork2) on the main form under the main thread not the one DoWork is running under.
Plese do not refer me to another post that mighe give me a part answer, try to explain to me what i have to do and why.
I'm working with a form that has five combo boxs, when the form loads it goes to the modQuotations where there is a public sub that loads the comboboxs with data from a database but it after its done loading the form there is nothing in the combo boxs. [code]..
How to read in data from an arduino bluetooth microcontroller? I am new to microcontrollers and I have limited VB experience. The arduino is currently outputting some data to the arduino software screen. I have opened the COM port for the arduino in VB but am unsure how to get the data into a VB string.
I've been coding a Windows applicaton for the past seven months but there aren't a lot of "windows" in the application so I have a question on getting and returning data from forms. I display a form and the user makes a listbox selection then presses Ok. Normally I can proceed from there (in a class module) with values from the config file, but sometimes his selection will require me to ask for more information. So I want the class to display a form, pass control to it, then when the user hits OK on this form, return to the class. What is happening is the class continues with all its inline code and function calls and doesn't show the form until the end of its current function.
Dim flClientInputFile As New CFile Dim flPreparedOutputFile As New CFile Dim lRecordCount As Long Dim sProcessing As String Dim sTest As String Dim frmAbc As New frmAbc frmAbc.Show() frmAbc.Activate() x()
When I run and step through this code, I find I'm in x() before I even saw the form. x() needs the data the user has entered on frmAbc in order to continue.
I have an ArrayList that is set to Friend. Once I click my button "abc" is added to the ArrayList and then the form MsgBoxes out the Count of 1 (Correct).When I use Threadpool to count the number of objects within the ArrayList it always returns 0.
Example:
Imports System.Threading Public Class Form1 Friend Alphabet As New ArrayList
[code]....
I am obviously getting some sort of cross-thread issue here but have no idea how to correct this. I usually just setup single threads so this is my first time playing with ThreadPool & already lost at step 1!
Finally starting some coding in VB.Net, I notice over the years, that we can say (in VB6)
Code: Dim MyForm_Stock as NEW frmStock
in the same session, being able to open, say 3 Stock Forms at the same time and maintain details independently of each of the other forms. Also am I able to maintain separate Database connections and the same table being opened and updated independently of each other by each separate form. What is actually taking place in terms of memory being used by each process? My ultimate goal is to be able to have ONE Module with all the possible data Connection and Recordset Opening and closing options, which I have failed miserably to do in my VB6 experience. Data access is an obvious module based set of subroutines. Others could be Date routines eg, Week Number of the year, Days Diff, Days to, etc. [Code]
I need a good book for beginning to use VB 2008. I have some (limited) experience in using VBA. I want to access a database (SQL) and have access to the data set as variables?
I have a basic application that allows pre-defined users to use the application.The Username & passwords along with some other basic user info is stored in a simple access dbIn my application I want a user to login, Username & PasswordI create a connection string, a data adapter and a dataset, I then need to validate the password the user has entered.Would it be best to query the access db directly, or the dataset?
I'm trying to connect a VB application (2010) to an MS Access DB by adding a data source from the data menu but I receive this error message "The connection you selected uses a local data file that is not in the current project.Would you like to copy the file to your project and modify the connection ?
If you copy the data file to your project, it will be copied to the project's output directory each time you run the application" and the options are (yes , No , Help)
If I choose Yes I will not be able to make the application 'device independent ' since it will not be copied under the bin , and if I choose No , changes won't be applied to the DB