Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default comma as concatenation operator ?

Here is a snippet of some extremely annoying code:

"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & strDir & Left(Sheets("Home").cboMonth, 3) &
"" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=NO;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databas" _
, _
"e Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bu" _
, _
"lk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet" _
, _
" OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _

I hope your newsreader doesn't make this worse by wrapping, but my question is this: each line of this code (written by the macro
recorder) ends with a line continuation character and then the next line is simply a comma and another continuation character. The
only way this makes sense to me is if the comma is being used instead of an ampersand for a concatenation operator. I have never
heard of this before and couldn't find anything about it. Is this for real? The answer is important because I can't use the
auto-generated code as-is. Also, it looks stupid, cutting words in half and generating a nearly blank row before continuing. Why
would it do that?

Most importantly, please tell me if the comma is useable as a concatenation operator.

Thank you in advance !
--
RMC,CPA



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default comma as concatenation operator ?

The comma is the argument separator for the function. It has nothing to do
with concatenate. The under score is the new line extender. The & is a
concatenate operator. You can also use + as a concatenate operator but it is
not recommended. What you have there is just really long function arguments...
--
HTH...

Jim Thomlinson


"R. Choate" wrote:

Here is a snippet of some extremely annoying code:

"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & strDir & Left(Sheets("Home").cboMonth, 3) &
"" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=NO;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databas" _
, _
"e Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bu" _
, _
"lk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet" _
, _
" OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _

I hope your newsreader doesn't make this worse by wrapping, but my question is this: each line of this code (written by the macro
recorder) ends with a line continuation character and then the next line is simply a comma and another continuation character. The
only way this makes sense to me is if the comma is being used instead of an ampersand for a concatenation operator. I have never
heard of this before and couldn't find anything about it. Is this for real? The answer is important because I can't use the
auto-generated code as-is. Also, it looks stupid, cutting words in half and generating a nearly blank row before continuing. Why
would it do that?

Most importantly, please tell me if the comma is useable as a concatenation operator.

Thank you in advance !
--
RMC,CPA




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default comma as concatenation operator ?

That is what I thought as well, but it doesn't make any sense that any argument within an array or function might include a fraction
of a word or a fraction of a file extension, as is done in this case. Also, it seems clear that the semicolon is being used to
separate the arguments. Additionally, since I didn't get a reply before I pretty much had to have one, I went ahead and wrote my
code based on stuff similar to what you saw in my post, and used the comma at the end of a line where I would normally use the "&",
and it worked. I couldn't believe it.
--
RMC,CPA


"Jim Thomlinson" wrote in message ...
The comma is the argument separator for the function. It has nothing to do
with concatenate. The under score is the new line extender. The & is a
concatenate operator. You can also use + as a concatenate operator but it is
not recommended. What you have there is just really long function arguments...
--
HTH...

Jim Thomlinson


"R. Choate" wrote:

Here is a snippet of some extremely annoying code:

"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & strDir & Left(Sheets("Home").cboMonth, 3)
&
"" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=NO;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databas" _
, _
"e Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bu" _
, _
"lk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet" _
, _
" OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _

I hope your newsreader doesn't make this worse by wrapping, but my question is this: each line of this code (written by the macro
recorder) ends with a line continuation character and then the next line is simply a comma and another continuation character. The
only way this makes sense to me is if the comma is being used instead of an ampersand for a concatenation operator. I have never
heard of this before and couldn't find anything about it. Is this for real? The answer is important because I can't use the
auto-generated code as-is. Also, it looks stupid, cutting words in half and generating a nearly blank row before continuing. Why
would it do that?

Most importantly, please tell me if the comma is useable as a concatenation operator.

Thank you in advance !
--
RMC,CPA






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default comma as concatenation operator ?

Addendum: I know you sent a reply less than an hour after my post. Sometimes in the stress of a situation, I'm sure you've been
there, 45 minutes seems like 4 and 1/2 hours. I probably closed my newsreader after about 30 minutes because I had gotten it to work
(finally) and couldn't wait to see what was said, if anybody ended up coming in with a reply.

Thanks for your help. I hope I didn't seem to confusing.

Richard
--
RMC,CPA


"Jim Thomlinson" wrote in message ...
The comma is the argument separator for the function. It has nothing to do
with concatenate. The under score is the new line extender. The & is a
concatenate operator. You can also use + as a concatenate operator but it is
not recommended. What you have there is just really long function arguments...
--
HTH...

Jim Thomlinson


"R. Choate" wrote:

Here is a snippet of some extremely annoying code:

"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=" & strDir & Left(Sheets("Home").cboMonth, 3)
&
"" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=NO;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databas" _
, _
"e Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global Bu" _
, _
"lk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Jet" _
, _
" OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _

I hope your newsreader doesn't make this worse by wrapping, but my question is this: each line of this code (written by the macro
recorder) ends with a line continuation character and then the next line is simply a comma and another continuation character. The
only way this makes sense to me is if the comma is being used instead of an ampersand for a concatenation operator. I have never
heard of this before and couldn't find anything about it. Is this for real? The answer is important because I can't use the
auto-generated code as-is. Also, it looks stupid, cutting words in half and generating a nearly blank row before continuing. Why
would it do that?

Most importantly, please tell me if the comma is useable as a concatenation operator.

Thank you in advance !
--
RMC,CPA






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract the text between last comma and last but one comma. Sreedevi Excel Worksheet Functions 2 March 5th 08 11:12 PM
Comma Delimited-need comma at beginnng & end Tattoo Excel Discussion (Misc queries) 2 December 11th 07 04:39 PM
what does ~ operator mean? Todd Excel Discussion (Misc queries) 3 November 22nd 05 05:30 PM
Excel How do I create a comma delineated xls file to a comma delineated. Mark Excel Discussion (Misc queries) 0 November 26th 04 10:28 PM
Can the AND operator be of use here? Milind Excel Programming 3 July 27th 03 11:17 PM


All times are GMT +1. The time now is 06:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"