473,379 Members | 1,220 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,379 software developers and data experts.

(0x800A0415) Expected literal constant

For the life of me I can't see what is going wrong here... Why am i
getting the above error

<%

'DataBase
const DSN_NAME = "ORADBA"
const DSN_SERV = "localhost"
const DSN_UID = "ORADBA"
const DSN_PWD = "ORADBA"
const MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" & DSN_SERV & ";uid="
& DSN_UID & ";pwd=" & DSN_PWD & ";"
%>
Please note, MM_Prod_DSN is defined on a single line.

Jan 14 '06 #1
2 6246
<un*********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
For the life of me I can't see what is going wrong here... Why am i
getting the above error

<%

'DataBase
const DSN_NAME = "ORADBA"
const DSN_SERV = "localhost"
const DSN_UID = "ORADBA"
const DSN_PWD = "ORADBA"
const MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" & DSN_SERV & ";uid="
& DSN_UID & ";pwd=" & DSN_PWD & ";"
%>
Please note, MM_Prod_DSN is defined on a single line.


You cannot construct a constant! Try this instead:

Dim MM_Prod_DSN
MM_Prod_DSN = "dsn=" & DSN_NAME & ";server=" _
& DSN_SERV & ";uid=" & DSN_UID & ";pwd=" & DSN_PWD & ";"
Jan 14 '06 #2
ahh... I thought it was ok as long as i didn't try to change it
afterwords.

thank you

Jan 14 '06 #3

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

Similar topics

5
by: Lecture Snoddddgrass | last post by:
Back in the old Visual C++ days, it was always important to define constant strings only once so that they wouldn't be stored over and over again in memory. Has .NET resolved this issue? Consider...
7
by: al | last post by:
char s = "This string literal"; or char *s= "This string literal"; Both define a string literal. Both suppose to be read-only and not to be modified according to Standard. And both have...
4
by: songkv | last post by:
Hi, I am trying to reassign an array of char to a string literal by calling a function. In the function I use pointer-to-pointer since I want to reassign the "string array pointer" to the string...
3
by: Stephen Mayes | last post by:
Is there any way to represent a literal numerical value in binary? My wish would be something like 0b0011 instead of the hex 0x0F. ( if this is even the same. ) Sometimes I find it's easier to...
3
by: lovecreatesbeauty | last post by:
Both `K&R C, 2nd' and `C: A reference manual, 5th' introduce the "hello, world" thing using the name "string-constant". But `ISO/IEC 9899:TC2' does not include this kind of thing in section `A.1.5...
13
by: hn.ft.pris | last post by:
Hi: I have the following simple program: #include<iostream> using namespace std; int main(int argc, char* argv){ const double L = 1.234; const int T = static_cast<const int>(L); int arr;
4
by: Quentin Yuan | last post by:
I always consider that the constant character strings of which literal value are the same lay out at the same logic address, in another words, every constant character string have only one copy in...
20
by: karthikbalaguru | last post by:
Hi, String constant being modifiable in C++ but, not modifiable in C. that is, In C++, the following example output will be "Mplusplus" char *str1 = "Cplusplus"; *str1 = 'M'; In C, the above...
18
by: sinbad | last post by:
hi, why does the following program gives an runtime error ,instead of compilation error. anyone please shed some light. thanks sinbad ------------------------------ int main()
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.