|
-
June 15th, 2012, 06:07 AM
#11
Re: HELP! :( Login not working
I've never created a database that way and I'm not sure that's the right way to do it!
Why not just use a tool like Microsoft SQL Server Management Studio to connect and create the database, then create the EmpID and Password fields and populate them.
Although ASP is old technology, it's easy to modify an ASP script to be a VBScript and test it, so I created a database called "datasource" and a table called "CarInfo" and made some fields: "EmpID" and "Password" and then added some data, opened a command prompt and created a TEST.VBS file which says:
Code:
strConn = "Provider=SQLOLEDB;SERVER=server\sqlserver;UID=sa;PWD=password;"
strSQL = "SELECT [EmpID],[Password] FROM [datasource].[dbo].[CarInfo]"
Const adOpenStatic = 3
Const adLockReadOnly = 1
Const adCmdText = &H0001
set conn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.Recordset")
conn.Open strConn
rs.Open strSQL , conn, adOpenStatic, adLockReadOnly, adCmdText
Do While Not rs.EOF
WScript.Echo rs("EmpID") & VBTab & rs("Password")
rs.MoveNext
Loop
rs.Close
Conn.Close
Then ran CSCRIPT TEST.VBS and it listed all the records I'd entered. I would expect the equivalent ASP code to do the same thing (however I'm not in a position to test that).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|