ADO data control

sir. i have made a project in VB6.0 that ADO data control when i make

Page 1 of 1

11 Replies - 5433 Views - Last Post: 06 March 2010 - 10:41 PM Rate Topic: -----

#1 muneer82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-January 10

ADO data control

Posted 27 January 2010 - 11:37 AM

Private Sub Command1_Click()
Dim s
 s = Text5.Text
 If Len(Trim(s)) > 0 Then
 s = "07software='" & UCase(Trim(s)) & "'"
 Adodc1.Recordset.Find s
 End If
End Sub

Private Sub Form_Load()
Dim iRecords As Integer
	
	Dim strDBPath As String
	
	strDBPath = App.Path
	
	If Right(strDBPath, 1) <> "\" Then
		Me.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Muneer\My Documents\database work\db1.mdb"
		 
		
	End If



Admin Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: ADO data control

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: ADO data control

Posted 27 January 2010 - 12:03 PM

Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:

  • Post the code you're having problems with (DONE)
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

Was This Post Helpful? 0
  • +
  • -

#3 muneer82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-January 10

Re: ADO data control

Posted 30 January 2010 - 12:02 PM

sir,
this code is working only my computer when i make EXE file run it on the other computers it gives MSADODC file is missing error and path is missing. this is the error which i always found when i run on other computers.
it is proper work on my computer or those computers where VB6.0 is installed. but it doesnt work without VB 6.0.

This post has been edited by muneer82: 30 January 2010 - 12:06 PM

Was This Post Helpful? 0
  • +
  • -

#4 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ADO data control

Posted 30 January 2010 - 12:44 PM

hello :)
first:Data Source=C:\Documents and Settings\Muneer\My Documents\database work\db1.mdb
is the path to db1.mdb on your PC. second you will probably need ms access on other computer. + you need to add all the dlls your program use. use deployment package on your vb6
Was This Post Helpful? 0
  • +
  • -

#5 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: ADO data control

Posted 30 January 2010 - 07:36 PM

it's always advised keeyp your db with a seperate folder near your exe and also use the
app.path


This post has been edited by thava: 30 January 2010 - 07:37 PM

Was This Post Helpful? 0
  • +
  • -

#6 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: ADO data control

Posted 31 January 2010 - 11:29 PM

Actually thava, using app.path in not recommended and not allowed on newer MS systems. Instead, on should use Environ("appdata") & "\" App.EXEName & "\" & filename.mdb...

As for the OP's problem, you cannot just put a VB6.0 exe on another computer. You need to use either the OUTDATED PDW, Inno, or Windows Installer 1.1. Also, hard coding paths is not a good idea because the user could select a different place to install your program and its dependencies, thus breaking your program.



Good Luck
Was This Post Helpful? 0
  • +
  • -

#7 muneerabro82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 05-February 10

Re: ADO data control

Posted 05 February 2010 - 07:56 AM

Sir, NOBRAIN, yes this is the path of my database(C:\Documents and Settings\Muneer\My Documents\database work\db1.mdb) Sit, what is dll? where i ve to use this one and what is Deployement package for vb 6.0. Sir please reply soon.
Was This Post Helpful? 0
  • +
  • -

#8 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ADO data control

Posted 05 February 2010 - 12:16 PM

hello :)

dll is Dynamic-link libraries see the link. they are used by your program by every reference you have added. the OCX files are components your program have for example Microsoft DataGrid Control 6.0 use MSDATAGRD.OCX. to use them you need the ppl. you give the program to have it. So how to give them? Use Deployement package (setup making program) your VB 6.0 have one. Go to Start menu -> all programs -> Microsoft Visual Basic 6.0 -> Microsoft Visual Basic 6.0 Tools-> Package And Depoyment Wizard.

good luck dude :)

This post has been edited by NoBrain: 05 February 2010 - 12:18 PM

Was This Post Helpful? 0
  • +
  • -

#9 muneerabro82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 05-February 10

Re: ADO data control

Posted 11 February 2010 - 10:43 AM

Thanks Brother.
I ve seen your Reply within 2 mints. Thanks a lot brother. I will remain oblidge to you. Again
thanks
Was This Post Helpful? 0
  • +
  • -

#10 muneerabro82  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 05-February 10

Re: ADO data control

Posted 06 March 2010 - 12:38 PM

[Sir,No brain i still didnot find my solution help me to solve my problem. it is not still working on other pc's
]
Was This Post Helpful? 0
  • +
  • -

#11 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: ADO data control

Posted 06 March 2010 - 04:13 PM

If your using Access i am not sure but the other PC must have it too.
Was This Post Helpful? 0
  • +
  • -

#12 ram11  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 86
  • Joined: 30-November 08

Re: ADO data control

Posted 06 March 2010 - 10:41 PM

Not neccessary u need MS access on another pc until & unless u have to edit the database,
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1