Question : Accessing MySQL thru VB.NET

Dear Helper,

I am using Visual Basic .NET 2008 as my primary programming language and MySql as online database. Currently I am able to connect to online database using mysql connector for basic data retrieval purposes.

I have to make a client database program. I have a client db which is in mdb format and resides on a desktop pc. That db shows information on users, their details, products they have subscribed to and so on.

Now I need to port it online so that I can access information from anywhere. But I need to maintain security. For example: if i have a friend who has a username & passport, he/she can access it from anywhere if I port it online. But I want that the db should be accessed by specific systems only. This will ensure that someone with login credentials should not access it from cyber cafe or other place with internet access. It should be accessed by authorised computers only (like computers in office / home).

The only way I though I could do that is to lock the id with system code so that if the application is running from a specific pc then its ok otherwise not. That I can do.

I have a linux based webserver so I can create a mysql database. Using mysql connector I can pass sql and query the db from my vb.net program and exchange information. My queries are -

- Accessible a db (mysql) with around 3K records with vb.net problem can take a little time. Is that true ?

- My logic is > read all records of db into array. If I add/edit.del rec then update changes online.

- How can I show progress bar if I am reading from db because with sql statement entire contents are thrown at one go (I think)?

- If I want to take backup and view content offline (incase I have net issues) How can I do that ?

- Any precautions or measures I should take to ensure data integrity ?


Will be glad if anyone can help me answer my queries.

Thanks a lot,

Cheers,
Saurabh

Answer : Accessing MySQL thru VB.NET

Side: You other project has probably implemented SummonGameObject as a static method in the WorldObject class.

GameObject* WorldObject::SummonGameobject(uint32 id, float x, float y, float z, float angle, uint32 despwtime)

This line however gives the impression that it's non-static, but my rough guess is that it should be static because it seems to take GameObject's Id as first parameter GO_ICE_WALL stands for game object ice_wall. This method is the usual Global lookup method that locates register game objects and therefore makes sense to be static, unless ofcourse a worldobject is a composite game object composed of other game objects.

if(GameObject* pGate = m_creature->SummonGameObject(GO_ICE_WALL, 5540.39f, 2086.48f, 731.066f, 1.00057f, 0))

 Maybe you can check with the other project and see how they have done it. BTW, if SummonGameobject can return a GameObject that may not always be WorldGameObject then the return type should be a bit more stricter to avoid further unnessary typecasting and make subsequent code more typesafe. Otherwise it probably makes more sense to put it in GameObject rather than WorldGameObject.

It could be as simple as copying to Worldobject.h/cpp (if those are the names). Otherwise you should try to have your own design as you may see fit. Start by just defining it in Creature, if you need it elsewhere you can move it to the base class and refactor accordingle.

Would have been less of a guess game, had you have posted the source code ...

Random Solutions  
 
programming4us programming4us