Loading

Vb.6 & Ms, Access Help...

Submitted by: 
Visitors have accessed this post 5157 times.


Hi...Everyone I am new to this community I have noticed that here all the quries are resolved systamatically seeing this I have also asked my friends to join it..I have a query and this is my 1st one so hope for a best reply,I want to insert the data in Ms Access through code using in vb6. Could I,
get a best asvise for it.Tahnks,I am deliberatly seeking for the replies.




Comments

Hello...Everyone

Dim ws As Workspace
Dim db As Database
Dim rs As Recordset

Private Sub Command1_Click()
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase("Myaccessfile.mdb")
Set rs = db.OpenRecordset("Table1", dbOpenTable)
End Sub

' where as Myaccessfile.mdb -> is File name, Table1 is the table name

can you pls help me how to made a voting system using visual basic 6.0

admin's picture

You are using the old way (DAO) of connecting to a database. ADO is the new technology to connect to a database.

Anyway you can do this the same with ADO:

  1. with rs
  2. .addnew
  3.  
  4. !Field1 = txtLastname.text
  5. !Field1 = txtFirstname.text
  6.  
  7. .update
  8. end with

Please let me know how to print a bill using printer
in Vb6

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.