开发者

How to open database connection only one time

When working with CRUD开发者_运维技巧 operation in flex, I want to know how to open only one time for all update and delete operations. How can I do this?


As Flextra's mentioned in his comment above, Flex doesn't access the database directly. You'll have to make a RemoteObject call to another layer that will perform the actual CRUD operations.

That being said, unless you want to perform all of your CRUD operations in one giant batch, I would not recommend keeping the database connection open just waiting for something to do. That's generally considered poor practice. I would recommend opening and closing the connection to your database as needed when performing each operation.


It depends on the server-side technology if you aren't talking about a local SQLite database.

PHP has the mysql_pconnect() for a persistent connection for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜