I am making a small game in vb6, now I want to have a highest score table included. I want to have a database on my web space that holds the highest score table values. I know the basics for entering and retrieving the values using sql.
Basically what I need to know is how can I connect to the database on my web site and if so do I need to have any special features configured with my ISP who provide me with my web site space.
The code I use to alter and read from the database using sql is below
'Declaring your database
Public MyDatabase As ADODB.Connection
'Tables into your database
Public MyTable1 As ADODB.Recordset
Private Sub Form_Load()
'Set your variables to nothing (just for stability)
Set MyDatabase = Nothing
Set MyTable1 = Nothing
'Connecting to your DB
Set MyDatabase = New ADODB.Connection
Set MyTable1 = New ADODB.Recordset
'Here's where you're to set all your database options
ConnectionString = "Provider=SQLOLEDB.1" _
& ";User ID=sa" _
& ";Password=password" _
& ";Initial Catalog=aTable" _
& ";Data Source=mypc\SQLEXPRESS"
MyTable1.CursorLocation = adUseClient
'Insert into table
MyDatabase.Execute ("INSERT INTO Table_1 (name, address) VALUES ('new','value')")
'Delete from table, or to delete all use 'DELETE * FROM TableName'
MyDatabase.Execute ("DELETE FROM Table_1 Where name='KJ'")
I dont want to just show a web page with a list, I actually want to get the values from the aTable.mdf database held on my site and place them directly into my vb6 application.
I hope this makes sense
<password cleared by angelIII, zone advisor>