Results 1 to 4 of 4

Thread: Data Connection WOES!

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    When I test this code in InterDev for an .asp page I get this error:

    An exception of type "Microsoft Database Engine : Unspecified Error' was not handled.

    then it singles out this line of code

    Any ideas what's wrong?

    Code:
    .Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\ryyyya\yyyy.org\Emailer\Emails.mdb;Persist Security Info=False"
    here is code before it

    Code:
    Dim Dconn, sSQL, sSQL2, cmDC, SQL, SQL2, Recordset
    				
    	Set Dconn = Server.CreateObject("ADODB.connection")
    		Dconn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\ryyyya\yyyy.org\Emailer\Emails.mdb;Persist Security Info=False"

  2. #2
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    There is nothing wrong with your code just put a

    Code:
    Response.Expires = 0
    at the top of your program and it should work
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Talking

    What DOES that code do?

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    When I run the debug in INterDev, this new code does bypass the original problem area but now breaks in another line farther down in the code and gives me the same error as before!

    Here is the line it breaks on:

    Code:
    For count = 0 to 5 
    			if MyEmail(count) <> "" then
    				sSQL2 = "INSERT into Recipient(Email, SenderID)VALUES('" & MyEmail(count) & "'," & Recordset.fields("AID") & ")"     
    					Dconn.Execute sSQL2
    						'Response.Write "sSQL2 = " & sSQL2 & "<BR>"
    			end if
    	Next
    This is where I am trying to insert the emails into the DB. Maybe it is breaking because the emails exist already and it doesn't like it. It's ok with me if the emails already exist so that is not an issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width