Microsoft Visual Basic 6.0 for PC Logo

Related Topics:

Posted on Feb 12, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Hw to link database using visual basic

If the database is stored in SQL server and the front end is designed in visual basic, how can this be linked.which connectivity like odbc,adodb etc supports this activity.please do give me the procedure as well as the hint of codes to link them at run time.......its an urgent please if anyone knows jst share your knowledge...............please..........

  • Anonymous Feb 12, 2009

    use adobc <------try this

    dim rs as new adobc.recordset
    dim cn as new adobc.connection

    private sub xn()
    cn.cursorlocation = aduseclient
    cn.open "CONNECTION STRING" <------
    end sub

    private sub form_load()
    if rs.state=adstateopen then rs.close
    rs.open "select * from TABLENAME" ,cn, adlockstatic, adlockreadonly
    if rs.recordcount > 0 then
    set datagrid1.datasource = rs
    end sub




×

2 Answers

winserp

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.

Master:

An expert who has achieved Level 3.

  • Master 363 Answers
  • Posted on Nov 14, 2016
winserp
Master
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.

Master:

An expert who has achieved Level 3.

Joined: Oct 11, 2016
Answers
363
Questions
0
Helped
211020
Points
1105

If you want to know more things about RSGold can go to this website www.rsgoldfast.com
Our service is the most professional and most secure and convenient

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Feb 12, 2009
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Feb 12, 2009
Answers
1
Questions
0
Helped
316
Points
3

Use adobc <------try this

dim rs as new adobc.recordset
dim cn as new adobc.connection

private sub xn()
cn.cursorlocation = aduseclient
cn.open "CONNECTION STRING" <------
end sub

private sub form_load()
call xn
if rs.state=adstateopen then rs.close
rs.open "select * from TABLENAME" ,cn, adlockstatic, adlockreadonly
if rs.recordcount > 0 then
set datagrid1.datasource = rs
end sub

Ad

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

326 views

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

Sudeep Chatterjee
Sudeep Chatterjee

Level 3 Expert

3269 Answers

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3869 Answers

Brad Brown

Level 3 Expert

19190 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...