Why liew
08-12-2005, 02:26 PM
hi i am a student now doing the system and facing the pobrem for the connection to database.
because now i am usung the connection like :-
set conJ=server.CreateObject("ADODB.Connection")
set rsJ=server.CreateObject("ADODB.Recordset")
cnJ = "Driver={MySQL ODBC 3.51 Driver};server=localhost;uid=root;database=gm"
strSQLJ="SELECT * FROM number WHERE ctype='GR'"
rsJ.open strSQLJ, cnJ
in all of my form.So when i need to change the connection then i need changing all of my form in my system.So have some easy way to solute this problem??For example using the function (include file) then the such connection will save in 1 file 1st?So do you all have some easy sample for that!So if got please reply me ok???
So thank you 1st for anyone read this message!
:confused:
because now i am usung the connection like :-
set conJ=server.CreateObject("ADODB.Connection")
set rsJ=server.CreateObject("ADODB.Recordset")
cnJ = "Driver={MySQL ODBC 3.51 Driver};server=localhost;uid=root;database=gm"
strSQLJ="SELECT * FROM number WHERE ctype='GR'"
rsJ.open strSQLJ, cnJ
in all of my form.So when i need to change the connection then i need changing all of my form in my system.So have some easy way to solute this problem??For example using the function (include file) then the such connection will save in 1 file 1st?So do you all have some easy sample for that!So if got please reply me ok???
So thank you 1st for anyone read this message!
:confused: