ASP connect to SQL server 2000 problem!


Sorry. I got read a lot of attachment about how to connect ASP to SQL server but i still got problem about it. either i use which ways(there are 2 ways connect it)... it always has this error.

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

May I know what is it mean how to solve it
Posted On: Friday 26th of October 2012 07:36:05 AM Total Views:  475
View Complete with Replies

RELATED TOPICS OF ASP PROGRAMMING LANGUAGE




Trouble with databse connection

I don't know what I'm doing wroung in my connection to my database. I keep geting this error. Microsoft OLE DB Provider for ODBC Driverserror '80004005'[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /login/login.asp, line 14 Can soom one help me with this problem. Code: strConnect = "Driver={driver}; Database=[db]; UID=[username]; PWD=[password]" strUserName = TRIM(REQUEST("username")) strPassword = TRIM(REQUEST("password")) strUser = "" SET Conn = SERVER.CREATEOBJECT("ADODB.Connection") Conn.open strConnect Set RS = SERVER.CREATEOBJECT("ADODB.Recordset") strSQL = "SELECT * FROM login " strSQL = strSQL & " WHERE username = '" & strUserName & "' " strSQL = strSQL & " AND password = '" & strPassword & "' " RS.OPEN strSQL, Conn
VIEWS ON THIS POST

171

Posted on:

Friday 26th October 2012
View Replies!

Urgent help - totally weird, works locally but not online? 'not a connection issue!'

I am having a real problem. Look at the code below, basically it allows me to add a time out of 30 mins and also notes the user who logged in and the time and date they logged in so ideally I must keep this, but for some reason outside of local host (local server) and live it does not work. Below is my code: 'SELECT A CASE 'Call the case when required throughout the code Select Case action Case "Login" Call adminLogin() Case "Logout" Call adminLogout() Case "Add" Call addArticle() Case "Amend" Call amendArticle() Case "Delete" Call deleteArticle() Case "Delete" Call deleteArticles() End Select 'ADMIN LOGIN 'Perform the login operation using SQL & Validation IF statements Sub adminLogin() 'Open Connection Object Response.Write (openConnection) Set objRS = Server.CreateObject("ADODB.Recordset") If Request.Form("Submit") = "Login" then strSQL = "SELECT * FROM tblAdmin WHERE adminUsername='" & Request.Form("username") & "'" objRS.Open strSQL, strConnect If objRS.EOF then strFailed="Your Username is Invalid!" Else If objRS("adminPassword") Request.Form("password") then strFailed="Your Password is Invalid!" Else Session("ValidUser") = "true" 'Additional data input 'This basically add the details for the last time the user logged into the system 'It also sets the session timout to 30 minutes from the time the user actually logged in. Session("ADID") = objRS("adminID") objConn.Execute("UPDATE tblAdmin SET adminLastLogged=now() WHERE adminID=" & Session("ADID")) Session.Timeout = 30 '30 = Minutes 'end of addition Response.Redirect "cms.asp" objRS.Close End If End If End If End Sub The login is just one of my select! but nevertheless there is an issue here I am not sure of. The error I get returned is as follows: HTTP: 500 - Internal Server Error So the login does not work due to this issue, there is no data connection problem, and if i coment out the areas related it works fine. But like I said I really need this! But not sure how to fix this problem. CAN anyone spot a problem that might happen when online and not locally, as locally it works fine. Kindest regards
VIEWS ON THIS POST

220

Posted on:

Friday 26th October 2012
View Replies!

connecting databases

i tried using the search function, but all the stuff i get comes close but doesn't really help much. so, okay, i'm a newbie, let the bashing begin...but PLEASE help me afterwards. so i'm teaching myself how to build websites (i'm in high school...so no fancy degree or anything.) i figure i should make a dynamic one..i do know how to make static ones. so dont tell me to make a static one first. so this is my problem. i did this whole .asp website. it uses ms access databases to obtain data. it works fine (well kinda) in my localhost. but i wanted to see if i could upload it and see if it would work. well it doesn't. i have this free account with this asp hosts. so maybe it's that. but...how are you supposed to make a connection with your database i know you set that up initially in dreamweaver...i did, but when i upload the connFile.asp and click (or go to) home.asp it says that: "Microsoft JET Database Engine error '80004005' Not a valid file name. home.asp, line 8" i'm thinking that maybe it's because i'm using msaccess. i would do it in mysql, but i have no idea how to do that...i'm gonna learn though. this is my connFile.asp file (which was made in dreamweaver): the error says line 8 because in my home.asp line number eight is: 1 2 3
VIEWS ON THIS POST

386

Posted on:

Friday 26th October 2012
View Replies!

connection, possible variable area?

Alright i'm trying to open the table, which is determined by a querystring variable console and from there I'm trying to select the field game which isn't a variable and I'm trying to choose the name of the field by the specified title which is also a query string variable Code: Set rsconsole = Server.CreateObject("ADODB.Recordset") rsconsole.open ""' & console & '" WHERE game Like "' & title & '"", gameconn, 3, 3 rsconsole("cheats")=rsconsole("cheats")+1 rsconsole.update
VIEWS ON THIS POST

202

Posted on:

Friday 26th October 2012
View Replies!

connection string not working

I'm pretty new at asp and am having problems connecting to my Access database. I've tried writing the string several ways and all get the same error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. /search.asp, line 8 this is the relevant part of my code: I would appreciate any help anyone can offer me!!!
VIEWS ON THIS POST

170

Posted on:

Friday 26th October 2012
View Replies!

Checking for DB connection error

I have a basic ADO connectiion like this: strConn = "DSN=myDSN;uid=myUID;pwd=myPWD" Set oConn = Server.CreateObject("ADODB.Connection") oConn.ConnectionString = strConn oConn.Open I want to check for connection errors and if there is one, I want to print a message. How can I do this
VIEWS ON THIS POST

213

Posted on:

Friday 26th October 2012
View Replies!

ASP MYSQL ADODB.Recordset.1 error '800a0e7d' Invalid connection

I'm trying to connect to a MYSQL db using ASP and recieve the following error (response.write strSql included): Code: (SELECT * FROM tableFolio ORDER BY Id ASC;) ADODB.Recordset.1 error '800a0e7d' Invalid connection. /portfolio.asp, line 83 code (line 83 in red): Code:
VIEWS ON THIS POST

228

Posted on:

Friday 26th October 2012
View Replies!

HELP: connecting MSAccess DBs across IIS5 servers

If this is possible can someone tell me (and show me) Two IIS servers and two MS Access databases. I need to populate one with data from the other on the same ASP page. My opening attempts are as follows: Set DB1 = Server.CreateObject("ADODB.Connection") strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("DB1.mdb") & ";Persist Security Info=False" DB1.Open strConnection 'That's not a problem. Getting to the other database (off server) is a problem. How do I address it\t Set DB2 = Server.CreateObject("ADODB.Connection") strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=http://otherserver/DB2.mdb;Persist Security Info=False" DB2.Open strConnection 'Yukky If this is not possible, can you tell me how to pass a recordset across ASP If even this is not possible, passing an array will do (can't do that either)
VIEWS ON THIS POST

282

Posted on:

Friday 26th October 2012
View Replies!

(Urgent) Help me with database connection with acess in ASP? Code given. Thank You

Can someone please help me with this ASp script What i am tryiong to do Trying to connect to access database Is DSN set Yes Operationg System XP Prof DSN Name NW
VIEWS ON THIS POST

202

Posted on:

Friday 26th October 2012
View Replies!

Syntax and DB connection problem

Hi all, I'm trying to authinticate users and force a login using an Access DB and an include in all secured pages. I'm using a script from 4fromrolla.com however I can't get the connection string right, I've been having a go for about 3 days now and I just can't get it right. My path is d:\ftproot\shiv\data\ship-ahoy\captains_log.mdb and the table used for the user and password field is tableValidUsers the field names are as per the example. Could anyone please point me in the right direction,
VIEWS ON THIS POST

252

Posted on:

Friday 26th October 2012
View Replies!

connection query is asp

I am trying to change a connection in a script I am trying to understand from an Access Database located in the same folder as the file to a SQL 2000 connection. Can anyone tell me where I'm going wrong
VIEWS ON THIS POST

194

Posted on:

Friday 26th October 2012
View Replies!

Error connecting to OLAP cube using ASP

I'm getting the following error when trying to use ADO to connect to an OLAP Cube: Server object, ASP 0177 (0x8002801D) Library not registered It is pointing to the line: Server.CreateObject(ADOMD.CATALOG) I'm using SQL2000 with Analysis Services. I can connect to the Cube directly via Excel but not through ASP. I've installed SP3 on SQL and Analaysis Services. This has fixed the problem on other Servers, but not on this one... Any ideas
VIEWS ON THIS POST

253

Posted on:

Friday 26th October 2012
View Replies!

ODBC connection problems...

I'm having problems getting my ASP form to have it's drop down list populate from an Access databse. Here is the ADO for the connection: It keeps erroring out on line 5: conncar.open "parking" My ODBC datasource is named parking. I set it up through administrative tools/ODBC data source/System DNS tab and connected the correct database to it with the Microsoft access driver. Am I missing something to connect to the db
VIEWS ON THIS POST

251

Posted on:

Friday 26th October 2012
View Replies!

This code right?(ADO connection)

Code: I this right I keep trying, but I keep getting 500 internal server errors. Please help.
VIEWS ON THIS POST

168

Posted on:

Friday 26th October 2012
View Replies!

Syntax and DB connection problem - Page 2

Try this Code:
VIEWS ON THIS POST

225

Posted on:

Friday 26th October 2012
View Replies!

Table list from an ADODB connection

Fellow ASPers,I have been struggling with this all day. I want to retrieve a collection of all the tables in an Access database. I want to do it without knowing the table names ahead of time. I have found mention of the "Database.TableDefs collection" that is the replacement for "Database.ListTables"But, I can't seem to figure out how to do it. MSDN has examples of it utilizining VBasice. but I can't find any ASP reference.I am running on Windows 2000 Server and Access 2000.There are two major reasons why I need this ability. The real important one is to determine if a table exists so I can use the correct "insert into..." SQL statement.Hopefully someone knows about this topic
VIEWS ON THIS POST

133

Posted on:

Friday 26th October 2012
View Replies!

database connection

, I have uploaded my database to my server, and now i am trying to connect to the database, but coming up with this error http://www.thephoenixgroupuk.com/selfdrive_hire1.asp
VIEWS ON THIS POST

215

Posted on:

Friday 26th October 2012
View Replies!

oracle9i asp.net connection

what drivers, connection strings and variables do i need to install and specify to connect to Oracle9i database i am working through the examples from Zak Ruvalcaba's book Build your own ASP.NET website using C# & VB.net. i like this book very much; was able to connect to Access, MSDE and mySql . Now i need to know how to connect to Oracle9i.
VIEWS ON THIS POST

346

Posted on:

Friday 26th October 2012
View Replies!

connection with oracle

all, Can I connect oracle using aspIs it possibleI have done it with msaccess and sql server 2000 before. Can you guide me to create a connection with rdbms oracle with asp.(with dsn or without dsn) plz help me how to crate it
VIEWS ON THIS POST

284

Posted on:

Friday 26th October 2012
View Replies!

ASP DB connect prob: Object require .. not sure ...

HI , Little problem connectin to DB, and not sure why... Erro I get is : Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' /WebClients/pc_learn_intranet/timesheet/timesheet/edituser.asp, line 20 My code is Code:
VIEWS ON THIS POST

415

Posted on:

Friday 26th October 2012
View Replies!