|
He means - this is not a SQL question. It's a VB6 question - hence it shouldn't be in the SQL forum.
|
|
|
|
|
Try pressing F1 for help.
Also, VB6 is not a SQL question.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Ashfield wrote: Also, VB6 is not a SQL question
Nope. It is questionable though.
|
|
|
|
|
i don't have MSDN installed.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
Well try the granddaddy of all things, google!
To help, here's a link to vb6 functions
Visual Basic Command Syntax
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanx. Sure it is very helpful to me and for all the others who are beginners. Thanx.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
While trying to process multiple select statement and retreiving files from my database I get the following message:
"ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x271130
to COM context 0x2712a0 for 60 seconds. The thread that owns the destination
context/apartment is most likely either doing a non pumping wait or
processing a very long running operation without pumping Windows messages.
This situation generally has a negative performance impact and may even
lead to the application becoming non responsive or memory usage accumulating
continually over time. To avoid this problem, all single threaded apartment
(STA) threads should use pumping wait primitives (such as
CoWaitForMultipleHandles) and routinely pump messages during long running
operations."
How do I resolve this problem, I am using C# and SQL Server.
Thanks in advance,
Michael
|
|
|
|
|
The documentation for this can be found at http://msdn2.microsoft.com/en-us/library/ms172233.aspx[^]. It's a Managed Debugging Assistant, which is a component that is invoked by the .NET Framework Common Language Runtime (CLR) when debugging.
It's very unusual to get this message - I've never seen it in debugging .NET applications that work with databases. I believe it indicates that your UI thread was blocked for a long period of time. You should strongly consider moving any long-running queries to other threads.
All calls to COM objects that are marked Apartment thread model have to run on the thread which created them. This includes cleanup code. .NET's garbage collection model pushes anything that needs cleanup after garbage collection onto a finalization queue, which is read by a separate finalization thread. That finalization thread has to cause the thread that created the COM object to run the cleanup code. While it's blocked waiting for the original thread, other objects which require finalization just build up on the queue, because there is only one finalization thread in the process.
You should check that you're using the SqlConnection family of objects throughout and not trying to use OleDbConnection or use the classic ADO objects.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Hi,
I need to have a Matix report which looks like :
...............|YEARS
--------------------------------
...............|Class1|Class2|Class3
Programme|StudNo|StudNo|StudNo
ie; The Matix will look like this
Programme|.......2001.................|........2002............|.
------------------------------------------------------------------------
..............|Class1|Class2|Class3|Class1|Class2|Class3|.....
IT...........|..23...|...24..|..45....|..12...|..23...|..12..|.....
MBA........|..34...|...12..|..12....|..31...|..13...|..14..|.....
I don't know how to split the YEARS' column into 3 different subcolumns which has got class1,class2,class3.Each year has got the 3 different staic classnames. Under that the no of students in each class comes. The students in each class in each year should be calculated based on some condition. Its not available directly from a dataset. Hope u can understand the matix.
PLEASE HELP!!!
Thanks & regards,
Payal
modified on Thursday, March 6, 2008 8:38 PM
|
|
|
|
|
Your column groupings need to be Year and Class.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
The Class field has 3 static values Class1 Class2 Class3. If Class was a single dataset then only Year and class could be set as Column grouping.
Can u plz explain how to go about in the case where i have 3 different static values for the class?
Thanks
Payal
|
|
|
|
|
Thanks
I found out out how to go about it.
Payal
|
|
|
|
|
I have the following stored procedure (written in an "Execute SQL Task" in SSIS).
How do i get the value from @Error and set it to Global Variable in SSIS? The global variable name is "varError"
DECLARE @Error int
EXEC @Error = sp_delete_temp_people_import_tables
|
|
|
|
|
If you're using OLEDB
1) Set your string as
EXEC ? = sp_delete_temp_people_import_tables
2) In the Parameter mapping page, add a new parameter. Set the variable name to varError, Parameter Direction to "Output" and parameter name to "0"
If you're using ADO.NET
1) Just give your SP name in the SQLStatement box
2) Set IsQueryStoredProcedure to true
3) Add a new parameter. Set the variable name to varError, Parameter Direction to "Output" and parameter name to the name you've specified in the SP
Remember, if you're using ADO.NET, the SP must use an OUTPUT parameter and NOT a return value.
SG
Cause is effect concealed. Effect is cause revealed.
|
|
|
|
|
Im using OLEDB
Ive configured the properties as you said
Variable Name = User::intError
Direction = Output
Data Type = Long_Integer (global variable is expecting an int32)
Parameter Name = 0
but whe i run i get the following
##############################################
--Execute Stored procedure
EXEC ? = sp_delete_temp_people_import_tables
" failed with the following error: "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
################################################
When i try parsing it before i ran the package i get the same error as above - "Syntax error, permission violation, or other nonspecific error".
|
|
|
|
|
Is your SP returning a value through the RETURN statement or through an OUTPUT parameter?
SG
Cause is effect concealed. Effect is cause revealed.
|
|
|
|
|
This is my Stored Procedure
##############################
ALTER PROCEDURE [dbo].[sp_delete_temp_people_import_tables] AS
DECLARE @Error int
SELECT @Error = 0
SET XACT_ABORT ON
BEGIN TRANSACTION
DELETE FROM tempDataImport
SELECT @Error = @@ERROR
IF @Error <> 0 GOTO Error_Handler
COMMIT TRANSACTION
RETURN @Error
Error_Handler:
ROLLBACK TRANSACTION
RETURN @Error
###########################
|
|
|
|
|
I realy dont know what do try next. Ive done every thing and nothing see to work.
|
|
|
|
|
|
Thanks SimulationofSai. That link really helped. I got it working
|
|
|
|
|
You're welcome. It's a pleasure.
SG
Cause is effect concealed. Effect is cause revealed.
|
|
|
|
|
Hi Experts,
I had developed an Application in VB6 which has the database in MS SQL 2000. But that application I cant use to distribute frequently as I need to al teast install MSDE at the point. I just wanted to make an .exe with some encypted format files. which actually contain the data. Which in future if I needed can again convert into mssql. if support needed.
Is that possible, I have chosen ODBC but it supports .txt in open format which shows everything that is in database.
Thanks/ Jai
|
|
|
|
|
You can install SQL Server Express edition on the server if that is what you are asking.
As long as your application has the correct connection strings you can then directly query the MDF file/database.
Alternatively store the data as encrypted XML files (if VB6 supports XML).
Or encrypt the txt files and decrypt them on reading them into your application.
You always pass failure on the way to success.
|
|
|
|
|
Hi..
I'm Using the following Expression for Division in SSRS-2005 in C# Web Applications..
=Round(((Fields!Price.Value*100)/Sum(Fields!CPU.Value, "DataSet1_AmountDetails")),2) & "%"
When I'm Using this Expression i'm getting the Result as i'm expecting ..
ie.. 10.25%, 15.45%, 12.14%,.....
But the Problem is When i'm adding all the Values it is giving me 102.56%..
But I want to Show the Chart for only 100%..
If i'm not adding this Decimal points i'm getting the Total of 99%.. (ie 10,15,12,.......)
What can I do Now for getting the Chart to Show the Result of 100%..
Please give me any Suggestions..
Thank You..
|
|
|
|
|
Obviously, if you apply rounding to values and then sum the values the sum of those values may be more/less than 100% (depending on whether the values were generally rounded up or down). The solution is to only apply rounding on the presentation of the numbers by using a format expression. Your actual calculations should work with the original values, so summing the values won't result in rounding errors.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|