« first day (1510 days earlier)      last day (1670 days later) » 
00:00 - 17:0020:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 2 issue comments.
[Zomis/Duga-jenkins] 1 commit. 2 additions. 2 deletions.
 
12:39 AM
Achievement unlocked: engine problems on family vacation.
 
12:49 AM
@IvenBach Doh? What's it doing?
 
Causing problems. Engine won’t start. Key in ignition and repeated click. I do t do automotive but either starter working or fuel isn’t getting to engine. Tow truck already on its way.
I prefer staying at home and it going anywhere. Living life stresses me out too much...
 
Okay then no problemo
 
Ahhh... I was thinking you were on the road somewhere (I do automotive - there's very little I hire out to mechanics).
If it clicks and doesn't turn over that's most likely going to be the battery or alternator. Outside chance of the starter (those are usually fairly bullet-proof, and the clicking you hear is the starter solenoid).
 
So your car is protesting for taking passengers on holidays....@IvenBach
Is public transportation a possible route to get where you want to be at?
 
Car thought it would take a holiday too.
 
12:59 AM
I’m mechanically apt but live in an apartment. No space. Never go into repair work either. At least we are ~30 miles from destination and not 200. Could be worse.
@PeterMTaylor I protested when my wife mentioned it. That didn’t work. #DadNeverGetsListenedTo
 
1:27 AM
Sorry to hear that, @IvenBach. I'd agree w/@Comintern - should be a reasonably minor repair.
 
1:40 AM
I should really pick up another 16GB of RAM.
Windows 10 memory management is kind of dumb - starts paging like mad when it hits about 50% memory consumption.
 
2:12 AM
Found this on History:
> King Kamehameha II and Queen Kamamalu, showing a distinct lack of patience, took a trip around the world to England so that they could both die from Measles a decade earlier than their subjects.
 
2:44 AM
OK, so I'm working on getting constant values in the declarations and need an opinion.
How should non-printable characters be represented? I.e. VbCrLf = ?
 
@Comintern Here you go: There's no difference between Obama and Trump.
 
C style? VbCrLf = "\r\n". VBA style? VbCrLf = Chr(13) & Chr(10)
 
Oh, wait, you didn't mean that kind of opinion.
 
@this LOL
VBA style hex? VbCrLf = "&13&10"
 
thinking that if we want to appeal to the average VBA hobbler, the Chr(13) & Chr(10) seems better
but.....
why not vbCrLf = vbCr & vbLf
 
2:48 AM
Yeah, I can see that - it might be a bit long in the status bar.
 
then vbCr = Chr(13)
is there any longer literal value?
 
That would be a bitch to resolve, although I could hard code the standard ones.
I think vbCrLf is the longest one in the VBA library. I can't imagine there'd be a longer one.
 
If it's not how it's actually resolved then ignore my 2nd suggestion
 
It's resolved as the actual string containing a newline sequence.
 
hmm vbNewline is suppoed to be \r\n on Windows but \n on Mac, IIRC
 
2:51 AM
I initially ran into the problem when the serializer barfed on VbNullChar.
 
then Chr(13) & Chr(10) would be most faithful and friendly
 
@this I'll remember that as soon as we port RD to Mac.
 
lol
 
Yeah, I think that would be the most general purpose solution.
That reminds me. RD needs an inspection for the use of + as a concat operator.
 
totally, though there are legit use
 
2:54 AM
Like add the strings if they're numbers, but concat them if they aren't?
 
lol, no.
null propagation
example: (Lastname + ", ") & FirstName
assume the lastname is null; the result is just Bob whereas with a last name, it's Ward, Bob
 
Hmmm... I might have to try that. I was think more along the lines of:
?"1" + "1"
11
?1 + "1"
 2
 
that definitely should not happen
 
I'd say the null propagation would deserve an ignore annotation.
 
Yes i think it's better because it's very subtle and can be misused too easily
TBh I don't use that myself precisely because it looks "funny"
but i know some who put that to use
 
3:01 AM
Makes sense given the syntactic poorness of VBA.
 
@this I needed a laugh like that.
 
I'm trying to remember is the status bar already puts ellipses for expressions that are too long. The user constants and default values might be more problematic.
Const FOO As String = "This constant is going to be truncated in the status bar."
 
IIRC there's a tooltip that displays it in full
 
Hmm would that work even for long one?
 
not sure. it's a MSO CommandBar tooltip
 
3:05 AM
for example, the Access.Constants.dbLang*** constants are... mouthful
 
Const ALL_YOUR_TOOLTIP_IS_BELONG_TO_US As String = _
    "This tooltip will fill your screen. " & _
    "This tooltip will fill your screen. " & _
    ... 1000 lines later...
    "This tooltip will fill your screen."
 
> Compile error: too many line continuations.
but yeah
possibly crowds up the CE too, with "show signatures" toggled
 
Just truncate to 255 characters
 
I'll check to see if there's a length limit on it. If not, we can manually do ellipses after a sane amount of characters.
Don't need the NInject error message sized popups.
 
No, no, add OMG what are you doing to this poor constant?!? Do you have any sense of decency?
uh, CW isn't any better. :\ (nor are Debug.Assert)
 
3:09 AM
IDK, there's a valid use case for that - i.e. hard coding a template of some sort.
I just thought of another reason to use VBA expressions to represent the unprintable characters - eventually we'll need to evaluate the expressions from the other direction. If they're represented as valid code, we can just evaluate them like user expressions.
 
on an unrelated note, I've been playing with GIMP and trying to implement some of the feedback I got from GD.SE's 2.2 splash.. i.e. embrace the playful ducky. so I brought back the original squeaker. thoughts?
 
The sub-title "Open-Source VBIDE Add-In` looks kind of trippy in that font.
 
I also tried Century Gothic lol
 
I've always liked that image though.
 
@Comintern well, in that case, I usually put them in.... a table
 
3:16 AM
That looks a little formal.
 
I hate picking fonts
it's like the video store syndrome
 
IKR?
 
I prefer the first over second
but yes, the subheading is a bit too... Looopy
 
What about VBA comment style?
 
damn how do you change the text color
GIMP is nice.. but wow, what a UX
had to google "how to make a rectangle"
 
3:23 AM
It's in the tool options at the bottom of the toolbox.
 
@MathieuGuindon kind of ironic that.a graphic editing software can't look pretty, no?
 
You can also use that color picker in the middle with just about every tool that has a color associated with it.
 
what's the hex code for that color you got right there?
oh wait I can grab it from the screen
now that is awesome
bs
anywhere on the screen window
 
0x008832
 
3:29 AM
 
Damn, I could buy a new motherboard for the difference in DDR3 and DDR4 pricing for a 32GB upgrade.
 
That doesn't look bad at all. The green is a nice contrast.
 
yeah
at first I was trying to mimick the blue waves in the GD.SE answer
 
No reason my slow ass DDR3 should cost that much.
@MathieuGuindon That's actually kind of cool.
What about a catchy tag line?
 
3:32 AM
@Comintern yeah but a bit too much with the green comment
 
Rubberduck. Sink or swim.
 
lol
> reticulating splines...
that one's getting old though
@Comintern Rubberduck. Keep a water bucket nearby.
 
You don't have just the squeaker, right? It's the squeaker + water?
 
That's better than "Rubberduck. You're the one." (and less likely to trigger a lawsuit).
 
yeah the water is included
 
3:35 AM
I spent a good hour and a half removing it for the icons.
 
Rubberduck. Just when you thought it was safe to go back in the IDE.
 
Damnit. My gimp templates must not have made it through the hard drive crash.
 
Rubberduck. Makes a child play of a childish programming language
 
3:39 AM
This must be why we're programmers and not marketers.
 
Do you really want to be a marketer?
 
or GD artists. everything I do ends up screaming "trying too hard"
 
@this The only thing I'd like about that are the spreadsheets.
And I'd probably use them for graphic design too.
 
@Comintern that's only when they don't make their charts in MS-Paint though
 
@Comintern i would suggest you reconsider....
> "A bunch of mindless jerks who'll be the first against the wall when the revolution comes."
 
3:42 AM
Yeah, I get asked to make ridiculous charts at work.
@this Someone needs to make the spreadsheet of mindless jerks.
 
Leaves me hanging
 
^ how about the splash gets a localized caption
"initializing..."
yeah no
I mean, maybe, yes. but not instead of
 
The last graphic designer we hired would do something like this...
...except more minimalistic.
Drove me up the wall.
 
3:51 AM
Yep, we hired the marketing company with the web page that came up on like the 1000th page of results.
 
friend of a friend of some exec?
 
Not sure, but should probably remove that.
Is there a string extensions class somewhere in Rubberduck.Parsing somewhere that I'm missing?
 
yeah. this room has a non-zero chance of coming up in searches for that word lol
@Comintern there should be one
 
...just like every other site.
string.ToVbaExpression() needs a home.
 
gosh there's one in .Core, one in .VBEditor, and one in .Parsing.VBA
 
3:57 AM
@Comintern just checking -- would you be able to introduce unit tests for your PR?
@MathieuGuindon that's kind of why I sometime wonder if those are better off in the Rubberduck.Resources
to remind us it's shared
 
I can see why
yeah
 
The bad is that won't stop us from writing yet another extension.... :p
(IIRC, you can't see the extension methods listed until you refernce them)
 
@this Not that I'm aware of.
With the serialized declarations, it kind of all of them.
 
Buttons of all shapes and sizes are included for diversity. — Jacob G. 14 hours ago
 
@this Meh, not all extensions should be global. For example public static string ToClassName(this IntPtr hwnd).
 
4:02 AM
@Comintern but the 3 StringExtensions.cs files?
 
Yeah, that's a bit much.
 
wait ToClassName is a StringExtension?
 
No, it's an IntPtr extension.
 
As evidenced by this ;-P
to be honest i hate how extension method resist any decent organization.
 
it's local to VBENativeServices though
 
4:04 AM
and in that case, i would leave it there
 
Resource should only contain methods that are useful to more than ne project
 
Yes, although I could potentially see a reason to use this one from other modules: public static WindowType ToWindowType(this IntPtr hwnd).
 
awaits var name = VBENativeServices.ToClassName(ptr); static usage...
 
@Comintern IOW, we must do away with the serialied declaration to be able to unit test it?
 
4:06 AM
@MathieuGuindon :adds try...catch block:
@this No, but to unit test the resolver we need them serialized ATM.
The Excel specific inspections too.
 
^
or anything that needs to have a type library's declarations
 
To unit test it, we'd need to dummy up some tlbs and read those as test files.
 
If we do use IDL as earlier discussed, wouldn't that also unit test resolver, too?
 
@this yes but then just think of the resolver as some "declarations factory" that automagically turns a string of code into a bunch of declarations
 
Yes, and in theory we could just build a .tlb file for Excel.
 
4:09 AM
because it sounds more and more like serialization exists solely to unit test and not much more
 
@this the website used it, but the online inspector was removed since
 
At the beginning, it was faster to deserialize known libraries. Now I think reading the type libraries outperforms it.
 
although, processing uploaded .tlb's would probably work too
 
@Comintern not sure about that. If Excel's classes are registered in the registry, the fake TLB may not get used
 
Not if we mock the IReference it's looking for.
2018-07-24 21:40:37.9125;TRACE-2.2.6779.38823;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'Excel'.;
2018-07-24 21:40:40.0140;DEBUG-2.2.6779.38823;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Parsing' (thread 8);
Actually, deserializing might be faster. That's from reading the typelibs from my SerializedDeclarations.xlsm file.
 
4:14 AM
oh yes that'd work
 
And the XML load:
2018-07-24 23:14:04.0755;TRACE-2.2.6779.38823;Rubberduck.Parsing.VBA.COMReferenceSynchronizerBase;Loading referenced type 'VBA'.;
2018-07-24 23:14:06.5873;DEBUG-2.2.6779.38823;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Parsing' (thread 8);
 
IIRC, Max said that the 90 or so tests was extra slow
cos of deseraizliation/serialzation? (Not sure I remembered all the details)
uh, are you comparing apples to oranges?
 
Above. Looks like about half a second for all the libraries in \Rubberduck\RubberduckTests\Testfiles\Resolver
Yes. It's multi-threaded, so the first read isn't deterministic.
I snipped all the others in the middle.
 
Oh ok
 
The full version has 12 libraries in each log.
I'm guessing the bulk of that is for Excel - it's roughly the size of the other 11 combined.
 
5:11 AM
@IvenBach you asked for it (warning: mike is somewhat too close, no editing whatsoever, ..and apparently I struggle at counting to 4)
ttgtb
 
 
5 hours later…
 
3 hours later…
12:35 PM
@Comintern didn't notice last night but I just did the math, and the typelib load is still a mite faster, not XML load. Typelib load took 40.0140 - 37.9125 = 2.1015 seconds, while XML took 6.5873-4.0755 = 2.5118 seconds. May need more testing to see if it's consistent, though.
 
@this This is why I shouldn't do math by eyeballing it. Regardless, loading from XML presents issues outside the performance realm, mainly versioning.
 
The problem in the unit tests is that loading in 2.5 seconds is about two orders of magnitude too slow for unit tests.
 
@M.Doerner If I understood @Comintern correctly, the typelib loading w/o Excel is only half a second
we only have few unit tests that actually need Excel but I think we have more that uses VBA standard library.
 
I think the standard library loads much faster. The Excel type library is rather on the large side.
 
@Comintern yeah X.1 - X.9 can make the difference seem bigger than it really is. But it's good to know that we won't be losing anything when we change the process of loading.
 
12:43 PM
I also just realized that the times for reading the typelib include the time it takes to create the serializable declarations.
 
The tests involving the Excel type library take about 3s each.
 
We could make the load a test setup That way it loads only once for all unit tests that needs it.
 
I am not too sure how we could do that.
 
This implies putting all unit tests under a single test fixture. That might disrupt the organization....
 
I do not know whether that would really be necessary.
And we really do not want to put all tests into the same file.
 
12:49 PM
I'd be tempted to wrap the serialized declaration creation in DEBUG precompiler directives if it wouldn't make the declarations collector an #iffing mess. Given that we don't auto-serialize anymore.
 
@M.Doerner would a lazy singleton class work in this case? Presumably, it'd get loaded once by the test runner?
 
I just wanted to write something in that direction.
 
@Comintern that actually sounds like one more reason to burn the serialization stuff
 
Do statics behaved well in NUnit?
@this Trust me, I'd like to.
Granted, it does make it a lot easier to debug the COM collector.
 
I wanted to propose to cache the declarations the AddLibraryDeclarations method in the MockProjectBuilder (or was it in the MockVbeBuilder) returns.
These will never change between tests.
 
12:55 PM
I'd be on board with that. That would be a good idea even if we switch to loading tlb files instead of XML.
 
Agreed
 
Statics in NUnit seem to behave like ordinary statics, i.e. they do not get cleared between tests.
I have one concern, and that is actually related to some odd behaviour atm.
Although the serialized declarations are in the path we provide to the COM synchronizer in the test parser, it does not really pick them up.
Should it eventually pick them up, the entire AddLibraryDeclarations method would be superfluous and we would require a different loader to do the caching.
 
Some of the mocks are still using the async loader.
 
Huh, the mock should be set up to inject the synchronous one into the ParseCoordinator.
As long as you to not hand-build your parser in a test, this should be consistent.
 
Yeah, I only caught it using it with an assert - I haven't spent the time to track it down yet. Last comment on #4182
 
1:04 PM
@M.Doerner when we change how we load libraries, i think that problem will go away.
 
^^ Also, a custom loader would probably be a bit of work - the declarations collector is currently coupled to the parser state fairly strongly.
 
To start using the internal typelib in a structured way, I think the COM collector will need some refactoring anyway.
 
For unit testing, it would be ncessary to ensure that a IReference object is created passing in the path to faked TLB file. We should be able to let the collector to pick it up, right?
 
Still, writing a caching type loader decorator returning cached declarations and falling back to the underlying type loader otherwise should not be much work.
We are already faking the paths in the mock projects.
This would just be a configuration change.
At least, I think so.
 
1:22 PM
@this Yes - it basically only uses the path.
Although currently it checks the major and minor version to see if it has a serialized copy.
 
> For those digging for the continuator badge, line continuations are a secret weapon, but a line that contains nothing other than a line continuation is redundant, and should be removed to improve readability.

```vb
_
_
Option _
_
Explicit _
_
_

' ^ End of Option Explicit Statement
```

Note that the trailing line continuation, by definition, includes the blank line *after* the last line continuator.

Could, at a minimum, be rewritten as:

```vb
Option _
Explicit
' ^
> The problem seems to be that the very first line of LoadDeclarationsFromXml does not use the _serializedDeclarationPath and instead sets the path the production folder.
> This appears to be a scaling conflict between VB6's windows and WPF.

VB6 is fine *until* RD loads.

Will post a GIF when I get a chance.
 
1:49 PM
> Is there a badge for breaking syntax highlighting on GitHub? :imp:
> Did we ever discuss an indenter option to reformat line continuations? It seems like in the case of the indenter, a more general approach might be of more use.

I was thinking of something more along the lines of a "target" or "preferred" column width. For example, if your target column width was a GitHub friendly 95 then this...

```
Sub Foo()
Dim example As String
example = "This line has " & _
"a bunch of " & _
"short continuations."
End Sub
```
...would
 
2:07 PM
@Comintern Would you mind if I refactored the COM loading coordination a bit, when I am finished with the parser. The basic goal would be to properly separate the different approaches to load the declarations into separate classes implementing a common interface.
 
@M.Doerner Not at all. I do have a couple small changes to the ReferencedDeclarationsCollector on my local, but they should be merge-friendly.
 
[rubberduck-vba/Rubberduck] web-flow pushed commit 99813892 to aboutbox: added missing contributors
> You can give this converter a go if you like. It's just had WPF support added. This nearly merged pull request should lead to a really neat project file afterwards, though it's pretty easy to manually tidy up anyway.
 
This would only concern the top most level. So, all lower charges should not pose a problem.
Anyway, I will probably not be able to start with this bofore the week after the next.
 
[rubberduck-vba/Rubberduck] web-flow pushed commit cdb14d8a to aboutbox: updated copyright notice, closes #4214
 
I first want to refactor the parser as that is already on the top of my todo list.
 
2:20 PM
[rubberduck-vba/Rubberduck] web-flow pushed commit 2fe3bd29 to aboutbox: updated xml summary
[rubberduck-vba/Rubberduck] web-flow pushed commit 5d518631 to aboutbox: udpated copyright notice (ref.#4214)
[rubberduck-vba/Rubberduck] web-flow pushed commit 98bd6e2a to aboutbox: updated copyright notice (ref.#4214)
[rubberduck-vba/Rubberduck] web-flow pushed commit c8e15671 to aboutbox: updated copyright notice (ref.#4214)
[rubberduck-vba/Rubberduck] web-flow pushed commit 248ae783 to aboutbox: added missing contributors
 
@M.Doerner Does that include the resolver? I have one or two small changes to make in there for #1328, but I can wait pretty much indefinitely to make those.
 
> Also adds a few contributors that were missing.
[rubberduck-vba/Rubberduck] web-flow pushed commit 3b4e41c3 to aboutbox: updated copyright notice (ref.#4214)
> Shouldn't it be Rubberduck VBA project contributors rather than Rubberduck project contributors?
[rubberduck-vba/Rubberduck] web-flow pushed commit da7fceea to aboutbox: updated copyright notice (ref.#4214)
 
@Duga is the project not "Rubberduck"?
 
2:36 PM
[rubberduck-vba/Rubberduck] web-flow pushed commit 4f0a9373 to aboutbox: updated copyright notice (ref. #4214)
 
@Duga huh, Rubberduck.VBEditor is under MIT
 
@MathieuGuindon That does raise the question of whether we need to splash Rubberduck VB6 when that's ready to go.
 
@MathieuGuindon i was thinking more of the org name, which i thought was "Rubberudkc VBA" but I might be confused.
 
hence just "Rubberduck"... splash never said "Rubberduck VBA"
@this what I grasped from the OSS.SE post is that the GH org is irrelevant
 
I was thinking of "VBIDE" addin. Is that the same terminology in VB6? I thought they called it something else.
 
2:39 PM
should be, yeah
although, "VBE" and "VBIDE" are one and the same to me
 
OK, for some reason I was thinking it was Visual Studio 6.
 
let's ask Microsoft marketing for assistance
4
 
@MathieuGuindon pretty sure they will come back with a nifty title like "Interactive Duck Code Assistant for VBA/VB6/Misc: Clippy reloaded"
@MathieuGuindon Correct, but there was a side mention in the chat RE: trademarking. Moot since we aren't making it a legal entity.
 
Huh. I just noticed that the bottom of the About dialog calls it VBA.
 
[rubberduck-vba/Rubberduck] build for commit 248ae783 on aboutbox: AppVeyor build succeeded
 
2:45 PM
but is that the language and runtime, or the IDE?
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4231?src=pr&el=h1) Report
> Merging [#4231](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4231?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/0941bdcd6abbda99c9acad5f52da3ffbc7f66bc0?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4231 +/- ##
==========================
[rubberduck-vba/Rubberduck] build for commit 248ae783 on aboutbox: 52.23% (target 0%)
 
Unclear. I'm guessing language and runtime. I think the Version 8176 is the IDE version.
 
> @bclothier "rubberduck-vba", i.e. the GitHub organization, isn't a legal entity though. "Rubberduck" being the name of the project, "Rubberduck project contributors" was agreed upon in #4214, since we're not going to create a legal entity for this (right?).. not to mention VB6 now being supported.
 
is Rubberduck.VBEditor being under MIT a problem?
 
Yep, the 8176 is the minor revision. This is the dialog in Visual FoxPro.
 
2:50 PM
lol, "WFP"
oh no, it's "VFP"
I need more coffee
 
I think you mean WTF.
@MathieuGuindon The short answer is that there is no short answer. softwareengineering.stackexchange.com/a/204497
Are there components in Rubberduck.VBEditor that require it to be MIT?
 
IIRC it's MIT ever since Chris extracted it out of the main Rubberduck assembly
thing is, it's in the same repository
Chris wanted RD to be MIT in the first place, but the Antlr grammar was GPL, so we had to go GPL
 
Repo shouldn't matter. That's just where it lives. The licence would follow the library.
 
and then the Smart Indenter guys agreed to GPL, so we're kinda married to GPL now
 
I don't see any issue with different libraries having different licensing by my read.
The resulting license of the project combination is a forward acting event for the combination only. It is not a retroactive event.

So if someone else wants to take Foo and do something else with it, they are still free to do so without the copyleft provision of the GPL. However, if they take Bar+Foo, delete Bar and only use +Foo then they are still bound by the terms of the GPL since Bar+Foo was GPL'd.
 
2:56 PM
so one could conceivably fork RD, and build a brand new project on top of Rubberduck.VBEditor, under MIT
I'm fine with that
 
Yep. I'd wish them luck.
 
lol yeah
 
[rubberduck-vba/Rubberduck] build for commit da7fceea on aboutbox: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4231?src=pr&el=h1) Report
> Merging [#4231](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4231?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/0941bdcd6abbda99c9acad5f52da3ffbc7f66bc0?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #4231 +/- ##
==========================
[rubberduck-vba/Rubberduck] build for commit da7fceea on aboutbox: 52.23% (target 0%)
 
@Duga you're going to build every single one of these commits are you
 
@Duga Needs licence compatibility unit tests. </sarcasm>
 
27
Q: Could a Dyson fan scale up to be used as a bladeless aircraft engine?

GeoffDyson has been making bladeless fans for a few years now that accelerate a consistent stream of air without exposed blades. If this concept were applied to aircraft engines, it could potentially reduce the number of bird strikes, engine complexity/part count, danger for ground crews, etc. That ...

 
@this Actually, I kinda like that!
 
In theory, yes, but it'd cost you £300M and only hipsters could fly on it — Richard 18 hours ago
^^ Comment of the day so far.
 
somewhere, I'm missing the blindingly obvious:
Dim sqlUpdate As String
sqlUpdate = "PARAMETERS parmRowType text(255), parmSlideID Integer, parmSlideOrder Integer; " & _
            "UPDATE ReportDesignTemp  " & _
            "   SET RowType = [parmRowType], " & _
            "       SlideOrder = [destSortOrder] " & _
            " WHERE ID = [slideID];"
Dim qdef As QueryDef
Set qdef = CurrentDb.CreateQueryDef("", sqlUpdate)
qdef.Parameters("parmRowType").Value = "Selected"
qdef.Parameters("parmSlideID").Value = slideID
qdef.Parameters("parmSlideOrder").Value = destSortOrder
When I get to qdef.Execute, I get RTE 3061: Too few parameters. Expected 4
Where am I defining 4 parameters in that query???
 
3:32 PM
@FreeMan destSortOrder isn't declared.
 
@Comintern The blindingly obvious. Thank you! The typo is in setting the 3rd parameter.
no, the typo is in the UPDATE statement. slideID and destSortOrder are declared, just not shown.
 
Which back-end requires the PARAMETERS line?
 
Access
It's a local, temporary table to support modifying report definitions that are stored in a SQL Server table
 
Ahhhh... I've always just used the ODBC "?" syntax and defined them in the ADO parameter.
 
that looks like DAO though
 
3:37 PM
Yeah, I wasn't looking at it close enough.
 
although, I'm rather foggy about what's DAO vs what's Access OM
 
I use ADO everywhere to update the SQL tables, and was stumped on how to update a local table in code - that was the first example I found on SO. May or may not be the best example of code in the world, but it was expedient and functional.
ducks
*for some values of "functional". My update query didn't update the table... :/
 
4:02 PM
You can update your local table via ADO using CurrentProject.Connection as ADODB.Connection.
Then, everything works as usual in ADO. Well, almost: you probably shouldn't close that connection.
@FreeMan ^
@Comintern I only plan to do organizational changes. The resolver will not be affected.
 
4:44 PM
Thanks, @M.Doerner - I'll look into that as an alternative
 
00:00 - 17:0020:00 - 00:00

« first day (1510 days earlier)      last day (1670 days later) »