15,893,722 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by stackhoover (Top 14 by date)
stackhoover
8-Oct-11 8:51am
View
Thanks anyway!
PS: I commented that "=Nothing" a long time ago.. ;-)
stackhoover
8-Oct-11 8:29am
View
Tried that...The parameters end up neat as Parameter.Item 2-5 with correct name and value (Item 1 is the @RETURN_VALUE). The following line executes without complaints:
Set rst = Cmd1.Execute()
But, no trace of the command in the profiler...
The whole thing crashes in this line:
RVDATA = rst.Fields(0).Value
A lot of "Operation is not allowed when object is closed" in the properties of the rst. ;-(
I have also tested the whole udf using a plain text sql command, and not an command object with parameters, that does work! So the bug is not in the connection nor in the function on the sql server. I'm getting nuts!
stackhoover
8-Oct-11 8:05am
View
When I use adCmdStoredProc the command does not arrive at the server, at least the profiler can't see it. When i disable adCmdStoredProc I see "exec dbo.D100601RVDATABearingAllow" arrive at the server, but I also get the errormessage back that the variable @Fastener was not supplied....
stackhoover
8-Oct-11 7:57am
View
Hi,
I have just checked that. It's ok. Just before I execute Cmd1, in the debugger the Command text is: "{ call dbo.D100601RVDATABearingAllow(?, ?, ?, ?) }"
Are the question marks ok there? And is "call" correct? In the management studio the function only works with SELECT. Thanks for your help so far!
stackhoover
8-Oct-11 7:52am
View
Hi André,
when I try
SELECT dbo.D100601RVDATABearingAllow(2348,2,'f','SS')
directly in the management studio, the function returns the correct result.
Do I have to define a parameter of type adParamReturnValue to store the result in?
stackhoover
8-Oct-11 7:26am
View
I now use:
Cmd1.Parameters.Refresh
'----------------------------------------------------------
Cmd1.Parameters(1).Value = Fastener
Cmd1.Parameters(2).Value = Thickness
Cmd1.Parameters(3).Value = Material
Cmd1.Parameters(4).Value = ShearType
Just before I want to execute Cmd1 all parameters are there. My errorhandler is
AdoError:
i = 1
On Error Resume Next
Set Errs1 = cnt.Errors
For Each errLoop In Errs1
With errLoop
strTmp = strTmp & vbCrLf & "ADO Error # " & i & ":"
strTmp = strTmp & vbCrLf & " ADO Error # " & .Number
strTmp = strTmp & vbCrLf & " Description " & .Description
strTmp = strTmp & vbCrLf & " Source " & .Source
i = i + 1
End With
Next
But i does not catch any Ado error.
To me it seems like the problem is in this line:
Set rst = Cmd1.Execute()
Do I have to open the recordset somehow before I use it?
stackhoover
8-Oct-11 7:02am
View
Ok, I tried that, and after the refresh I get another parameter called @RETURN_VALUE. ?? (It is empty) Where does that come from? The original parameter Param1 set by me on the other hand has suddenly the value "Empty". What is going on??
stackhoover
8-Oct-11 6:06am
View
Hi !
Yes I have checked the connection, it's open. The command "dbo.D100601RVDATABearingAllow" text does arrive at the server. (sql profiler shows that). I have a error handeler, did not post in order to keep the post short and clear. In the vba debugger I can see that the parameter has been appended.
stackhoover
5-Feb-11 13:07pm
View
Right now it works! But it usually does not happen right away...
If this is the error, what buffer size should I put in the place of "sizeof(String)" to make it work correct all the time? "10" is somewhat restrictive..... Regards SH
stackhoover
5-Feb-11 12:53pm
View
When debuging the compiler stops at:
--> stuff.push_back(data);
return TRUE;
;-(
stackhoover
5-Feb-11 12:50pm
View
Ok sounds logical... Just tried it out. But I'm still getting: Run-Time Check Failure #2 - Stack around the variable 'String' was corrupted
stackhoover
15-Dec-10 16:10pm
View
Hi !
Thank you for your help.
It got me on the way a bit...
Right now in my main it looks like this:
Collapse
BOOL CALLBACK EnumVisiWindowTitles(HWND hWnd, LPARAM lparam);
int _tmain(int argc, _TCHAR* argv[])
{
MYHANDLES lumpi[10];
EnumWindows(EnumVisiWindowTitles, (LPARAM) &lumpi[0]);
My Callback funktion I have changed to:
Collapse
BOOL CALLBACK EnumVisiWindowTitles(HWND hWnd, LPARAM lumpi)
{
bla bla
lumpi[lumpi[0].count].haendchen = hWnd;
bla bla
{
The compiler underlines [0] and says:Expression must have pointer to object type. I have tried everything I could imagine in referencing and dereferencing but ...naaaat Sigh
Maybe someone has the final hint for me.
Thanks
stackhoover
12-Sep-10 13:55pm
View
In the build output window I also get this message when the prog terminates:
The program '[3492] textreader.exe: Native' has exited with code -1073741511 (0xc0000139) ??
stackhoover
12-Sep-10 13:48pm
View
Hello Richard!
I've just reinstalled XP (was planning to do so anyway..).
I still get that message. The strange thing is that I also get the message if i put the whole loop that uses ComparaOrdinal into comment//.
I have noticed before this error came up, that right now I'm writing a bunch of adresses to the file, but that should not be to hard to derefernce them and get the string itself instead...(Hint?)
How exactly did you build the project?
And how about this #define UNICODE thing. Do I have to put that in the file or is it enough if the UNICODE flag is set in the project solution settings? I have tried to look that issue up in the "Windows via C/C++" book, but it not really clear how it should be done.(Not to me..)
I'm glad for your help.
Cheers!
Show More