1 Attachment(s)
[RESOLVED] Multiple forms (yes ive searched)
ok hey all its been a while my computer was confiscated. so anyway im working with MySQL+VB but this is i assume a strictly vb question. on Form1 i log into mysql. if succesful i can bring up Form2 where i want to add a record. the problem is that my connection doesnt follow me to form2. ive attached my project. id put some code in this post but idk where the problem is.
Re: Multiple forms (yes ive searched)
If you want the connection to be available in both forms, and others, then I would say that you ought to put the connection in a module, such that it is shared. If you don't want to go that route, then you can create a custom constructor on Form2 that takes a connection as an argument, or you can expose the connection via a property on Form1.
Re: Multiple forms (yes ive searched)
i definately appreciate the quick response. In my hunt for an answer i saw the module thing so ima try tfigure it out. if you could assist me there id be gratetful.
Re: Multiple forms (yes ive searched)
ok thanks man i found it. it works now. im sure its horible code but its functional.