473,414 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

dsn less syntax

What's wrong with the syntax in this connection string?
It's a DSN less connection to an Access DB.
thanks!

<%
Set Conn = Server.CreateObject("ADODB.Connection")
MM_GenKAccess_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("authors.mdb") & ";" & _
Jet OLEDB:Database Password=48912; & _
Jet OLEDB:System database=" & Server.MapPath("system.mdw") & ";" & _
conn.open MM_GenKAccess_STRING
%>
Jul 19 '05 #1
1 1761
Well, you forgot to put some of your strings inside string delimiters, and
you had a trailing & _ that will likely cause problems. And stop letting
WISIWYG tools create stupid variable names for you! Try:

set conn = CreateObject("ADODB.Connection")

mdb = Server.MapPath("authors.mdb")
mdw = Server.MapPath("system.mdw")

connString = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & mdb & ";" & _
"Jet OLEDB:Database Password=48912;" & _
"Jet OLEDB:System database=" & mdw

conn.open connString
--
http://www.aspfaq.com/
(Reverse address to reply.)


"shank" <sh***@tampabay.rr.com> wrote in message
news:uq**************@TK2MSFTNGP10.phx.gbl...
What's wrong with the syntax in this connection string?
It's a DSN less connection to an Access DB.
thanks!

<%
Set Conn = Server.CreateObject("ADODB.Connection")
MM_GenKAccess_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("authors.mdb") & ";" & _
Jet OLEDB:Database Password=48912; & _
Jet OLEDB:System database=" & Server.MapPath("system.mdw") & ";" & _
conn.open MM_GenKAccess_STRING
%>

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Margaret MacDonald | last post by:
I'm currently setting up default selections in <select> lists by passing an array of those defaults as keys ( 'valuefoo' => true ) as an argument to the function that sets up the list. Then, as I...
3
by: M Wells | last post by:
Hello All, I'm wondering if anyone can tell me how to write an SQL statement that will select all records that are less than 10 minutes old, using a datetime column? Any help appreciated! ...
7
by: Rob Meade | last post by:
Hi all, Just spent an hour and a half trying to get something to work when we realised we had the same problem over a year ago... I have an ASP page which calls a stored procedure, all the...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
2
by: Kevin | last post by:
I am currently importing data into Access 2002 from 3 Sybase ASA 7.0 databases over a network. At this time I am using a ODBC System DSN connection using the proper ASA 7 driver. I would like to...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
63
by: time.swift | last post by:
Coming from a C++ / C# background, the lack of emphasis on private data seems weird to me. I've often found wrapping private data useful to prevent bugs and enforce error checking.. It appears...
2
by: desktop | last post by:
I get this error when I run my program: red_black_tree.cpp:188: error: no matching function for call to ‘std::less<MyObj<int::less(MyObj<int>&, MyObj<int>&)’...
3
by: sfrvn | last post by:
I have searched high and low and cannot find an answer to my problem. So now I turn to the collective genius of this newsgroup. Over-simplified examples This query criteria for field works:...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.