NEED TO UPDATE Access Database

lccengr

Member
Joined
Mar 27, 2009
Messages
15
Programming Experience
Beginner
Hello All,

I am trying to process many text files and then i am trying to update the access database after getting the values in a specific variable.

See the following Code which i have made in order to process.

Sub MELCon(ByVal FILE As String)
Dim n As Integer
Dim textline As String
textline = filereader.ReadLine() & vbNewLine
For n = 0 To 83
If textline.Contains("MELID=" & n & ";") Then
TextBox1.Text = n
MELID = n
Exit Sub
End If
Next
End Sub

The above code will read textfile and in the first line look for the string MELID=n; (where n could be any number from 0 to 83). Once found, i have stored it in another Variable MELID. Now i want the value of MELID to be updated in ACCESS DATABASE !

Kindly help me guys, i haven't worked with database before !! I have created the access database with 2 tables in it. I want to update/insert it in a single column of 1st Table.
 
First, learn how to do data access.. Read the DW2 link in my signature, section Creating a Simple Data App

Don't try to modify the instructions to your situation just yet; work through it fully as an example, then when you understand it, alter it to your situation
 
First, learn how to do data access.. Read the DW2 link in my signature, section Creating a Simple Data App

Don't try to modify the instructions to your situation just yet; work through it fully as an example, then when you understand it, alter it to your situation

Thanks brother but this was not my question !!

I know how to connect to the database through the wizard and then displaying the records in it, i have created the function/procedure which calculates the number. Considering that i have an integer who stores a value of 5. Now i want this Value to be updated in my connected database !

My database name is "DBMEL" and the columns in it are "BSC" , "CELL" , "BCCH" , i want to insert/update it in BSC Column only !!

My Database is connected with my application and i can see the tables/columns in my application, Just wanna know the code of FILLING my database with the values !!

What i have read is that i need to fill the DataSet first, please help and correct me if i am wrong, thanks !!
 
The generated tabladapters are capable of uploading data as well as download. Fill the data into a DataTable (local), calculate your numbers, put those in the datatable too, then upload it again using the TagbleAdapter.Update()

DW2 has links for Saving Data
 
Back
Top