I have a problem in SQL provider, when i type server name in my code it connect without any errors but if I want user to type the server name it gives an error "SQL does not exist or access is denied".
Hereunder what I mean. In the below code I typed server name and it connect without any problems conn.ConnectionString = "Provider=SQLOLEDB;server=cai-magedh-lt2;database=Att;user id=;pwd="<br/>
Lets See First off i was able to get to insert records(Code Below)Now im trying to get the program to prompt a message when the id or field exists on the key down event and not enter it if it exists and if it doesnt exist im guessing i could use my already existing code to insert it[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?
namespace of "system.runtime.caching" does not exist but in object explorer and microsof exist.i use microsoft visual studio 2010 and .net framework 4.0.i also cant use this name space(System.IO.MemoryMappedFiles & System.Runtime.Caching.MemoryCache)
any body know what is the problem. i want my program after doing something (opening a file or any thing that can do something my program use more memory.)use memory like startup run.
I'm trying to use variables created within a loop, but I'm not sure how to do this. I've searched around on the net and there is a few recommendations to try and put what I require into a function then just call the function.
I have Requests for VB(2005) very very important for my selly project!i need a button that determine if file exist and if that file exist then show a messagebox!and if not show messagebox!.
I am making a small application in which i have added a class module and a window forms in vb.net. i want to acess the shared variables and mathods of class without making any object.
Protected Sub Btn_Click(ByVal sender As Object, ByVal e As EventArgs) Dim Id as string = MyClass.getID Private Sub Sub2(ByVal doc As Document)
' in here i need to access the ID from the above sub the Id needs to be in the btn_click sub cos it reates a unike id every time it is clicked.I am trying to capture the id at the time the button is clicked and store it on a variable.
I have a string on my main form called String1. When I open another form, I need access to this value. In the form I open, I have always done something like:Dim NewString as String = Main.String1
This has worked in the past. Well, I ended up renaming my forms (from Form1 to Main) in the property window and it now when I type the above code, it does not list Main as a form. Nothing that I renamed seems to exist now.
Asp.net has turned out to be alot easier to use than PHP (so far). However, I have been searching for a while and simply cannot figure this out. How do I get the variables that are contained in the url of my page (that originate from a form that had the method "GET") and utilize them? For example, my page would be [URL]. How would I get the value of some variable?
I have been charged with porting a VB6 project into VB.NET. In vb6, if you were in a class separate to a particular variable, you could access that variable easily:
Public Class Foo Public k As Integer End Class Public Class Bar k = 12 End Class
In VB.NET, my understanding is that before you can use a variable in another class, you must declare a new instance of it: Dim foobar As New Foo This would be fine, but I have to access these variables from different classes and every time I declare a new instance, it wipes all old values from the variables, which I need. I tried using Inherits statements but they presented many problems.
I have a variable called VarNUM which stores a number from 1 to 10. What i want to do with this is based on the current number stored in that variable call a different set of variables from a module with Public Structure ITEM1. It has the same set of variables for ITEM1 - ITEM10 but with different values. So ya in raps how can i use the number in one variable to access a set of different variables? Something like ITEM(VarNUM) then the set of variables that all have same name but with different values so that i dont have to go,
Code: if VarNUM = "1" then name = ITEM1.name store = ITEM1.store
Development System is Windows7 using VS2010 Deployment systems are a combination of Windows XP, Windows 2000 and Windows 7 SQL Server is SQL2000 (soon to be SQL2005).
I'm facing a problem with my current member card reader development.
I'm reading the card number (just a serial number of 4 digits) with a card reader. this seems to work fine (even converting the text string to integers).
This number is then put in a query to find the exact record that corresponds with this number
I am querying the MS Access Database to display the results in a datagridview. This is my
Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data.mdb" Dim SQLString As String = "SELECT * FROM Groups where Selected = Yes" Dim OleDBConn1 As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(ConnString)
[code]....
The variable Selected from the query statement ("SELECT * FROM Groups where Selected = Yes") is a Boolean in the MS Access Database. However, this statement returns empty result even though most of the values for Selected are Yes. In the access database however, if I enter a 'Yes' for the value of Selected, it shows up as -1 and 'No' shows up as 0. So I even tried changing the query statement to ("SELECT * FROM Groups where Selected = -1") and also ("SELECT * FROM Groups where Selected = 'Yes'") but none of them work. Can you please help me fixing this query because I can't change the database?Also if I change the query statement to ("SELECT * FROM Groups"), then all the data shows in the datagridview, however, the values for Selected column do not display. Instead I see check boxes and I can't click them. How can I display the values correctly?
I'm tasked with the job of creating a javascript version of a units conversion application written in vb6. I have the source code but I don't have vb 6. The source code uses a dat file to hold a conversion array (unit type, unit, xfactor, plusfactor). Getting the data out of this file would be good to me. I tried creating a little app in vb 2010 to write the data from that dat file to a txt file using essentially the same code as the source code. And that has been somewhat successful (took a while to figure out the fixed string business). Now I can pull the data out as an array. The math elements of this array look fine but the strings are somewhat read-able but too garbled to use. I can't seem to fix that by changing the character set/encoding.
Public Function StoreFields() Dim Lockbox, Cash_Deposit_Date, Batch_Number Lockbox = Xdocument.DOM.selectSingleNode("dfs:myFields/dfs:dataFields/d:tbl_GC100/@Lockbox").Text
[code].....
I have tested the variables in the Functions and the are correct.
I've got a dictionary<string,string> that I need to access and use on several windows forms. In asp.net, I could store it in Session and use it from any aspx page. How would I do this in forms?
I get a message, "The MSDN collection does not exist. reinstall MSDN." When I try to access any of the HELP features of Visual Basic 6.0. I do not have an install disc for this. Is there a download or a place I can get this?
Last year (2010) I came across a FANTASTIC command that allowed me to take a string of variables with a common delimiter and break it all back out into separate variables (possibly an array) with one statement.
[Code]...
As long as the delimiter was a unique specifiable character, this one-statement command could break it out into elements. my memory and point me in the right direction.
I have code, shown below, that works all except for 1 thing: The variables being passed byRef get passed, but once modified in the else section of the "if me.invokerequired" code of RecordData, the variables are never updated in the calling function. To reiterate, the calling function does not receive the updated data that is in the variables custid and amt.When debugging, I see the data change in the else section of "if me.invokerequired", but once it returns from the callback the data is missing.[code]
I define some global variables of a class as follows:
Private Class MyClass Private var1 as Decimal Private list1 as List(Of string)[code].....
But I found that after this form is closed, all above variables, var1, list1, list2 still exist in memory. I thought they should be collected by gc since the form is already disposed as I confirmed.
Add: I have monitored half an hour after the form is closed. But these variables are not collected by gc. I have an automatic update procedure on the form which uses above variables.Since the above variables still hold values, the automatic update procedure is always called which causes exception. (One quick fix is to check if form.isDisposed in update procedure. But I do not think this is elegeant. Besides, these variables occupy memory.)