VB Bonds ..Help Required in an interesting case study in VB

  • abhinav_8182
  • Beginner
  • Beginner
  • User avatar
  • Posts: 41

Post 3+ Months Ago

Hi

I am designing a software for a coaching institute to help them maintain information about their students .

It caters to various areas like fee tracking , marks , general info etc etc ....

It has different databases for diferrent classes and subjects eg maths_12th , chemistry_11th etc etc

Now I want to give an option to the administrator of the software to create dynamic class

The admin for creating the class specfies

* The class name
* The corresponding paths of the required databases .
etc etc

All this information i store in some database "all_class_info"(to keep track of all the databases for the various classes )

Now when the admin wants to access some info of a class ....he just specifies the classname (combobox selectino) and
then goes on to see the particular report for that class ...

Now whenever he specifies the classname , the database path is automatically set .......

For this i need to retrive the path of the database from the "all_class_info" corresponding to the classname , store it in a
variable and use it


How do i actually do it



I store the path of the database as "text" in "all_class_info" .

I use the variable "var" to store database path as

dim var as string
dim rs as recordset
dim db as database

set db = Opendatabase("/all_class_info")
set rs = db.recordset(" blah blah blah")

found = false
rs.movefirst

do while found

if (combo1.text = rs(0) ) then //rs(0) stores the class name
found =true
var = rs(1) //rs(1) stores the data path
else
rs.movenext
endif
loop


Now How do i use this value of var that i got from this form ...in other forms to open this database ....



More Over how do i use this "var" delclared in this form in some other form

set db = var ...won't work


please please Help.....I'll be really grateful


THnx
Varun

__________________
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 88 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.