Skip to main content
GameDev.net gamedev.net
🔒 Locked

Online Database? HELP!

Started by amemorex Jan 5, 2002 at 8:32 PM 2 replies 400+ views
Original Post
amemorex
amemorex
I''m going to be attempting to make some sort of basic program that can send queries/recieve queries to an SQL server, but I need some major help. Basically, I am hoping for my program to be able to do the following: -Login to the SQL database that is stored on a server. -Send the SQL database your IP address, have it store it under your username -Have the program be able to recieve a list of all the IPS that are currently connected to the SQL server Where can I go or what can I read to learn SPECIFICALLY what I stated above? Since I''m a beginner when it comes to online database accessing, I''d rather code this in Visual Basic using some sort of control, but I''m willing to do it from C++ if I must. My friend is going to learn SQL and program the simple database which stores the usernames/IP''s, is there anything specific he should write in the database to work with the program I want to use? Should I even be using SQL for the online database? Basically, give me any pointers on where I can learn how to make my program communicate with the database. Thanks!
Shannon Barber
Shannon Barber
Check out ADO
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Cyberdrek
Cyberdrek
quote:
Original post by amemorex
I''m going to be attempting to make some sort of basic program that can send queries/recieve queries to an SQL server, but I need some major help.

Basically, I am hoping for my program to be able to do the following:

-Login to the SQL database that is stored on a server.
-Send the SQL database your IP address, have it store it under your username
-Have the program be able to recieve a list of all the IPS that are currently connected to the SQL server

Where can I go or what can I read to learn SPECIFICALLY what I stated above? Since I''m a beginner when it comes to online database accessing, I''d rather code this in Visual Basic using some sort of control, but I''m willing to do it from C++ if I must.

My friend is going to learn SQL and program the simple database which stores the usernames/IP''s, is there anything specific he should write in the database to work with the program I want to use?

Should I even be using SQL for the online database?

Basically, give me any pointers on where I can learn how to make my program communicate with the database. Thanks!


To answer the question quickly, yes, use SQL, second, as mentioned by Magmai Kai Holmlor, use ADO...


"And that''s the bottom line cause I said so!"

Cyberdrek

Resist Windows XP''s Invasive Production Activation Technology!

"gitty up" -- Kramer
/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com
Hash Bang Slash bin Slash Bash -- #!/bin/bash
[Cyberdrek | ]
Peeper
Peeper
Like they said ...ADO I use it practically everyday.

VB - from memory, so check it!:


Public Sub LogUser (UserName as string, IPAddress as string)
Dim rst as ADODB.Recordset

set rst = New ADODB.Recordset

with rst
.Open "tblLog","provider=sqloledb;" _
& "Sever=ServerName;Initial Catalog=DatabaseName;" _
& "User ID=Name;password=whatever;", _
adOpenDynamic, adOpenForwardOnly
.AddNew
!strIPAddress = IPAddress
!strUserName = UserName
.Update
.Close
end with

set rst = nothing
End Sub


As an aside: I hope you are not expecting the IP adresses to be unique and static. Proxy Servers and AOL will guarantee thousands (millions?) of people with the same IP. And, dynamic IP adresses (DHCP) means that users IP addresses can change from session to session.

Edited by - Peeper on January 5, 2002 11:05:54 PM

Edited by - Peeper on January 5, 2002 11:07:22 PM

Edited by - Peeper on January 5, 2002 11:08:03 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.