Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2007, 08:13 AM
Authorized User
 
Join Date: May 2007
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default Mismatch error

Can someone help me out to fiind what i m doing wrong in the code bellow....

<HTML>
<head>

    <title>MY First Page</title>




</head>

    <body>

    <%
        dim con
        dim rs
        dim DBstr
        dim conStr


    Set Con = Server.CreateObject("ADODB.Connection")

    DBStr "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
    "D:\ASP Databases\student.mdb" & ";"


    con.ConnectionString = DBstr
    con.open

    Response.write = "connection is successfull"

    Con.close
    Response.write = "connection is closed"

        %>

</body>


</HTML>
__________________
Cheers
Sheraz
 
Old May 16th, 2007, 08:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

please please if you post some code you have to point out what type of error you receive or at least the line that is making the fault... anyway I see 2 problems...
first every dim doesn't have the type of variable...
second:
Code:
DBStr "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &_
    "D:\ASP Databases\student.mdb" & ";"

if this is a string, it should had a = between DbStr and the rest...


HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 16th, 2007, 10:45 AM
Authorized User
 
Join Date: May 2007
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default

thanks dude its been sorted.i will take care next time

Cheers



Cheers
Sheraz
 
Old May 16th, 2007, 10:50 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Also, this is not .NET code, it is Classic ASP. Please post in the Classic ASP forums ^^

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Mismatch Error arholly SQL Server ASP 1 March 18th, 2008 02:34 AM
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
Type Mismatch error Sheraz Khan Classic ASP Basics 0 May 16th, 2007 08:12 AM
DTS mismatch error venkatkk SQL Server DTS 1 July 28th, 2004 08:40 AM
Mismatch Error on OpenRecordset mikedu Access VBA 4 February 19th, 2004 11:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.