Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Basic Question -> How do i make one?
Old 01-31-2005, 12:45 PM Basic Question -> How do i make one?
Skilled Talker

Posts: 58
Trades: 0
This may soud the most basic question in the world, but how do i create an access database for use online?

I need oue with the collums 'username' & 'password' and i need my program to be able to read/ write to them. how do i do it?

I have opened up access and created a normal database, but how do i do one of the ones used on the web?

Please help if you can

KGB
__________________

Please login or register to view this content. Registration is FREE
KGB-911 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-31-2005, 01:53 PM
Junior Talker

Posts: 2
Location: England
Trades: 0
There is no difference between your access database created on the desktop compared to one that is used on the web. All you need to do is to create an ASP connection script which access the database.

eg:

Dim strdbconone
Set strdbconone = Server.CreateObject("ADODB.Connection")
strdbconone = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("databasepath.mdb") & ";Jet OLEDBatabase Password=password;"

The above will create a connection to the database (replace 'databasepath' with you database path & password with your password if applicable)

The next script will create the recordset:

Dim rsPersonIDCheck
Set rspersonIDCheck = Server.CreateObject("ADODB.Recordset")
Dim strSQL
strSQL = "SELECT username, password FROM Person ;"
rsPersonIDCheck.Open strSQL, strdbconone

From this you can read and display records, if you wish to add records to the table then you need to open the table with the appropriate lock and command (adLockOptimistic) eg:


Set rsPersonIDCheck = Server.CreateObject("ADODB.Recordset")
rsPersonIDCheck.Open "tblUsers", strdbconone, 2,2

This will allow you to write to the database.
Once finished do not forget to close the recordset and database connection.

Hope this helps you,

If you need more help then PM me and i should be able to send you an example script.

Rich
kingrich is offline
Reply With Quote
View Public Profile
 
Old 01-31-2005, 01:56 PM
Skilled Talker

Posts: 58
Trades: 0
Thanks, is there any particular format i need to save my database in, i am using dreamweaver to write to the database, so the code i should not need

thanks,

KGB
__________________

Please login or register to view this content. Registration is FREE
KGB-911 is offline
Reply With Quote
View Public Profile
 
Old 01-31-2005, 02:21 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
You'll just use the standard Access file format. Your database file should end with the .mdb extension.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 01-31-2005, 02:23 PM
Skilled Talker

Posts: 58
Trades: 0
it does, but where do i save it?
__________________

Please login or register to view this content. Registration is FREE
KGB-911 is offline
Reply With Quote
View Public Profile
 
Old 01-31-2005, 02:53 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
Save it anywhere your ASP script has access to.
When you set up the connection as in kingrich's post, change the path to point to your database.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 02-01-2005, 04:06 AM
Skilled Talker

Posts: 58
Trades: 0
thanks guys, in the end i managed to get a MySQL database to work

Thanks anyway

KGB
__________________

Please login or register to view this content. Registration is FREE
KGB-911 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Basic Question -> How do i make one?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24266 seconds with 12 queries