Re: Syntax
- From: thejamie <thejamie@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 May 2008 06:19:03 -0700
Some time during the development phase I received some errors regarding the
use of the Char(39). I am not getting those now but I am still confused
about why the double quotes are used at all in SSIS when working with the SQL
Server connections. They are understandable in the context of the Access
database strings but in the case of Access, the connection string is actually
just the filename and path and if the mapping from the SQL Server portion is
accurate and is correctly formed, the information should flow smoothly from
one to the other.
So, you mention to be careful regarding the "'s (single quotes) which, is
actually my question. I am unable to determine whether to double quote the
entire line of the sql query or procedure (either will work fine), and
whether the variable is @TargeDB or @[User::TargetDB] or whether the
Replace(@[User::TargetDB],"mytext","myreplacement") is double or single
quoted or left without double and single quotes. The syntax is
extraordinarily unclear. The errors seem to be ambiguous.
For example:
The connection string format is not valid. It must consist of one or more
components of the form X=Y, separated by semicolons. This error occurs when a
connection string with zero components is set on database connection manager.
Is the above error due to the inability to acquire the connection to the
Access database because I have syntax errors in my SQL Server information and
thus, being non-well-formed, the string format causes the connection manager
to fail? I still do not see why the expression @[User::TargetDB] - the for
each variable of my container, is being quoted and then there is the
complaint regarding the ConnectionString not being written to the property -
wouldn't that be the "VALUE" portion of the @[User::TargetDB] loop?
I will try this all again later - I gave up again this week and ran through
the 250 database, with the 16 clicks required to run the wizard once for each
of the 250 plus Access databases by hand. The goal is to give my arm a rest.
It takes about 6 hours to run through it. It would seem a no-brainer that
if I can run the entire process in a wizard environment 250 times without
incident that the wizard should easily automate the process.
Thanks much for posting though. Just hearing from someone else is helpful.
--
Regards,
Jamie
"jhofmeyr@xxxxxxxxxxxxxx" wrote:
Hi Jamie,.
My understanding is that you have a SQL Server database with a table
of values related to MDB files, and that you are having trouble
getting a stored proc to run against this (SQL Server) database to
retrieve some details. Please correct me if I'm wrong.
Based on the error messages you've posted, it looks as if the
Expression is not being evaluated correctly. There are a number of
pointers:
1) ... " the expression "EXEC CREATECOUNTRYTABLE
@[User::TagetDBNames]" failed. " - This indicates that the variable
name (not the variable value) is being substituted into the
expression. Check that you have the "'s in the right place.
2) ... " Description: "Incorrect syntax near '='.". " - This indicates
a syntax error. Look again at the expression you posted:
<quote>
"select left(abc,110)abc,left(cityname,90)cityname from
fips.dbo.encryptedcities where
cc1="+REPLACE( UPPER(RIGHT(@[User::TargetDB],6)),".MDB","")
</quote>
There should be a ' after the "=" in that expression, and another one
in the REPLACE statement (inside the ""). So:
"select left(abc,110)abc,left(cityname,90)cityname from
fips.dbo.encryptedcities where
cc1='"+REPLACE(UPPER(RIGHT(@[User::TargetDB],6)),".MDB","'")
The error messages in your last post look like they're related to the
Access database connection string, and not the Expression issue you're
having with the stored proc execution. Maybe once we have the sproc
returning correctly we can address the Access connection manager
settings.
Good luck!
J
- Follow-Ups:
- Re: Syntax
- From: jhofmeyr
- Re: Syntax
- References:
- RE: Syntax
- From: thejamie
- RE: Syntax
- From: Jamie
- RE: Syntax
- From: thejamie
- Re: Syntax
- From: jhofmeyr
- RE: Syntax
- Prev by Date: Re: Importing Excel files with columns > 255 chars
- Next by Date: Re: Syntax
- Previous by thread: Re: Syntax
- Next by thread: Re: Syntax
- Index(es):
Relevant Pages
|
Loading