473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

instantiating a database object?

I have created a simple Database class the connects to a MySQL database
server, and selects the appropriate database.

What is the best way to implement this class? I want to avoid having
instantiate a new Database object every time I execute a query, is this
possible? If I used static members and methods would a connection
(mysql_connect) be called every time? Could I possible store the open
connection in memory and allow it to be accessed by all the users
visiting the site?

Any thoughts are appreciated. TIA.

Donnie

Jul 17 '05 #1
0 1850

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: pesso | last post by:
I have an array of filenames, which are paths to the .NET assembly DLLs I built. I know for sure that these assemblies have public method, Execute(). In the run-time, I want to be able to...
2
by: FredC | last post by:
S Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 Total Physical Memory 1,024.00 MB MDE 2003 Version 7.1.3008 ..NET Framework 1.1 Version 1.1.4322 SP1...
5
by: Scott Johnson | last post by:
I thought interfaces have no implementation so how can I create a DataReader from an IDataReader Interface and use it similarly to how I would use an OleDBDataReader? How is it that the block of...
9
by: Carl | last post by:
Hi, I have a class in .Net which I instantiate in my code behind on one of my aspx pages. When I am finished with the instance, what is teh best method of taking it out of memory. Should I...
6
by: Gary Frank | last post by:
What are the ramifications if I were to instantiate an object tens of thousands of times and add them to an array? Or hundreds of thousands of times? Do you know if the act of instantiating a...
1
by: Marja Ribbers-de Vroed | last post by:
I've been provided with a custom ActiveX DLL (written in C++) that reads a certiifcate to generate a signature for a passed XML string, and I'm having trouble instantiating it. The DLL is registered...
3
by: Nagesh | last post by:
hi, I have seen the winvnc(tightvnc server) source code in this I seen that class member funtions are calling without instantiating the object i.e. like vncService::ShowDefaultProperties() where...
3
by: Randy | last post by:
Hi, I was learning about RTTI when I ran across this example. This line, out of the example, confused me. It is declaring a pointer to a base type and instantiating it with a derived class. I...
5
by: Mario Suau | last post by:
I'm working on a C# server based application using Sql Compact 3.5 as the database. It's designed to run as a service. My problem is that when I run the service, the following line of code takes 15...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.