Question about Microsoft Windows XP Professional

1 Answer

Property management system

How can we connect adodb in visual basic 6.0?Can you give us some codes in searching?

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Brigadier General:

    An expert that has over 10,000 points.

  • Master
  • 10,406 Answers

Nice try! Find an upper-class student to give you one-on-one tutoring with your homework.

Posted on Dec 02, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Can give an example of search command code?in visual basic 6.0


If you click on the following link you will find tutorial of Visual Basic and You will als so find example commands including some examples for parameter searches http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/109244

hope it helpss rick

May 18, 2011 | Operating Systems

3 Answers

Visual Basic and SQL


Hi,

Visual Basic 6.0 and MS Sql server 7 or 2000 are highly compatible with each other. VB.net is compatable with sql 2005 which is inbuilt as well.

Jul 07, 2009 | Microsoft Windows Vista Ultimate Edition

2 Answers

How to coonectivity excel sheet with visual basic with coding


Here is ur solution :
http://support.microsoft.com/kb/257819

Thanks,
Mukund
www.Einfochips.com

May 20, 2009 | Microsoft Windows XP Professional With...

1 Answer

How to connect vb with ms access


se Adodc OR Even better.. ADODB. for this you need to get MDAC fromMicrosoft free download.(check under project_References- Microsoft DataActiveX objects.. the current no is 2.8. if it is not there download invb directory.

next, you can learn about creating a DSN from control panel, ODBC. onceyou learn this, connection becomes a piece of cake. get some free vbtutoriasl from WWW.

then

you need to use DAO or ADO to connect to the database. better study both but since ADO is current, i am showing that code.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string
Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub
and for adding records:
say let us say you have 3 fields. then have 3 textboxes and 1 command button on the form.

private command1_click()
esql1="select * from Yourtablename"
rec.open(esql1),conn,, adOpenDynamic, adLockOptimistic
rec.AddNew
rec.Fields(0) = text1.Text
rec.Fields(1) = Text2.text
rec.Fields(2) = text3.text
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.
rec.update
if not rec.eof then rec.movenext
rec.close
conn.close
set conn to nothing
end sub

this will add new records to access table from VB.
' for picture store the full path of the path and the picture file nameint the text field. and in the picturebox of VB form for viewingrecords again you need ADO or ADODC and here you code:picture1.picture=Loadpicture(rec.fields(3) ' depending on where thepicture field is located. you need to make a few trials.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string

Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub

and for accessing records:

private command1_click()
esql1="select * from Yourtablename where id =" & val(text1) ' for integers

esql1="select * from Yourtablename where name=" & "'" & text1 & "'" ' for string

rec.open(esql1),conn, adOpenstatic, adLockreadonly

label1.caption =rec.Fields(0)
label2.caption= rec.Fields(1)
label3.caption= rec.Fields(2)
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.

rec.close
conn.close
set conn to nothing
end sub


' similarly there are routines to ADD, Delete, Edit, View etc.

Feb 26, 2009 | Operating Systems

1 Answer

I want connet foxpro databse to visiual basic


Using a DSN-less connection to open a free table
'
cn.Connect = "SourceType=DBF;" _
& "SourceDB=C:\Vfp\Samples\Data;" _
& "Driver={Microsoft Visual FoxPro Driver}"

Jan 20, 2009 | Operating Systems

1 Answer

Am not able to add/ retrive data


Proper syntax is:
With rstTemp
.AddNew
!FirstName = strFirst
!LastName = strLast
.Update
End With

Do you have the ADODB library loaded?

While in "Code" view...menu/tools/references ... look for a check by "Microsoft ActiveX Data Objects x.xx..."

If you don't have ADO reference library then setting ADODB recordset won't work no matter what syntax you use.

Hint: try using Ctrl+J while you code. The library will show you available syntax as you type.

Jul 20, 2008 | Microsoft Windows XP Professional

1 Answer

Connection of Oracle9i with Visual Basic 6


if oracle scott
password tiger
if not acccepted go to control panel ,administrative services put
oracle services manually & start it.
ur's kishore chowdary.(+919441133420)

Mar 28, 2008 | Operating Systems

1 Answer

Vb database connectivity


use odbc tool located in controll pannel and make a database file for use from visual basic6.0

Mar 22, 2008 | Operating Systems

Not finding what you are looking for?
Microsoft Windows XP Professional Logo

Related Topics:

35 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Operating Systems Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Scott Fryer

Level 2 Expert

80 Answers

Carlos L. Burgos
Carlos L. Burgos

Level 2 Expert

508 Answers

Are you a Microsoft Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...