|
| |
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
Security error - 7/25/2003 10:44:07
I was wondering if someone could help me out with some asp pages that I am trying to write up. I am having a problem creating a connection to a database. All the ones I try I get security errors and errors saying that the recordset I create cannot be used with the type of connection I am using. Thank for your time.
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 8:39:03
Parden my ignorance on this please. <% dim oConn dim rs_test Set oConn = Server.CreateObject(" ADODB.Connection" ) oConn.Open(" Provider=sqloledb;Server=2mawcpsws01;Database=navtree;Trusted_Connection=yes" ) %>
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 9:08:47
Or is there some sort od sample connection code I could possibly see, I need to connect to a Access table in a database from a simple search page i need to develop. Thanks again
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 14:15:14
I cant even get this little .asp or .htm to work together with a small table I build in Access, I know this has got to be something small to fix, any ideas, I really have no clue... here is the code for the .asp page <% dim oConn ' Holds the Database Connection Object dim rsaddcomments ' Holds the recordset for the new record to be added dim strSQL ' Holds the SQL query to query the database Set oConn = Server.CreateObject(" ADODB.Connection" ) oConn.Open " DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(" Test1.mdb" ) Set rsAddComments = Server.CreateObject(" ADODB.Recordset" ) strSQL = " SELECT tblASPTEST.First Name, tblASPTEST.Last Name, tblASPTEST.Children Name;" rsAddcomments.CursorType = 2 ' navigation through record set' rsAddcomments.LockType = 3 ' locks record' rsAddcomments.Open strSQL, oConn rsAddcomments.AddNew rsAddComments.Fields(" First Name" ) = Request.Form(" First Name" ) rsAddComments.Fields(" Last Name" ) = Request.Form(" Last Name" ) rsAddComments.Fields(" Children Name" ) = Request.Form(" Children Name" ) rsAddComments.Update rsAddComments.Close Set rsAddComments = Nothing Set oConn = Nothing %> here is the code for the .htm page <HTML><HEAD> <TITLE>Test For ASP</TITLE> <style> body{background-color:#30674b;font-weight:400} table{border:5px;border-style:outset} td.lang1{background-color:gray} td.lang2{background-color:#a2a2a2} td.lang3{background-color:gray} td{background-color:#3a7676} </style> </HEAD> <BODY> <H1><center>ASP TEST</center></H1> <P> <HR> <FORM METHOD=POST ACTION=" Test.asp" > <table width=" 75%" align=" center" cols=2 cellpadding=4 border=0> <tr><td>First Name: <td width=" 40%" ><input type=text First Name=" last" size=" 20" > <tr><td>Last Name: <td><input type=text name=" Last Name" size=" 20" > <tr><td>Children Name: <td><input type=text name=" Children Name" size=" 20" > </table><br><br> <br><br> <table width=" 75%" align=" center" cols=2 cellpadding=4 border=0> <tr><td><center><button type=" submit" >Submit Query</button></center> <Td><center><button type=" reset" >Start Over</button></center> </table> <br><hr> </form> </body> </html> Thanks again
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 15:26:29
Thanks for your time and help, but I still cannot get any new records added to the test table, eventualy I would like to search the table as well, but first I need to input the data, any other ideas, it seems so simple. Thanks again
|
|
|
|
Long Island Lune
Posts: 2340 Joined: 6/8/2002 From: New York Status: offline
|
RE: Security error - 7/30/2003 15:54:07
51, Question: Did you create the database INSIDE Access and import it in to your FP project?
_____________________________
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 16:05:48
Yes I did create the database with the table inside Access, however I never imported it into a FP project, the server I am on does not have server extensions, I am allowed to an ODBC connection though through Access. The .asp and the .htm pages i have code for I wrote in notepad, then just pasted them in the root directory of the server.
|
|
|
|
Long Island Lune
Posts: 2340 Joined: 6/8/2002 From: New York Status: offline
|
RE: Security error - 7/30/2003 16:22:46
Ouch, not a fun way to do it. Can you install the extensions, then import the database in to FP? Are you on an NT or Unix server?
_____________________________
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/30/2003 16:27:23
You guessed it, NT. I am a Civilian on a DOD server and Im not allowed to put FP server extensions on the server, actually im not even supposed to use FP at all so I am trying to work around the obsticles the best that I can. Thank you again for you time and Patience.
|
|
|
|
51
Posts: 49 Joined: 5/30/2002 From: Status: offline
|
RE: Security error - 7/31/2003 7:27:15
No, I get no error, I just get a page in the browser that dispays the .asp code. I then check the table (everything is spelled correctly in the code that correspond to the table) and it was not updated.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|