Hi. What data type do I need to represent a negative percentage? Everything I have tried returns an error or zero. Here's a simple example of what I want:
declare @a int
declare @b int
declare @c numeric(15,2)
select @a = 1450
select @b = 1650
Select @c = ((@a - @b)/@b) * 100
print @c
Scratch the last post. Code works fine. I have spent several hours on this, and the whole problem was I wasn't grabbing the input params correctly from VB! D'oh.
I am running a stored procedure from VB with ADO to SQL Server 7, and returning some output parameters. The proc runs fine from the query analyzer and returns values, but no matter what I try, I only get a value of NULL for my output params in VB. Help, please??
Here's some slightly cleaned up...
I am returning multiple recordsets from a SQL stored procedure, and using the ADO NextRecordset method to retrieve all of them into my VB app. Does anyone know if there are any problems created by passing too many recordsets back this way?? I am passing 7 recordsets back from one proc (I'm...
Does anyone know if there is a way to dynamically assign the name of a data report at runtime. I want to have a generic procedure to populate multiple reports at run time. But when I try to dynamically assign the name of the report I get errors.
Set rptReport = sReportName gives me an...
I have a website with all the content in DIV tags using CSS absolute positioning. On most computers and browsers (IE 5.5, IE 6, Netscape 5+) everything is fine. But on one person's computer using IE 5.5, all of the text appears as junk symbols - squares and other symbols. The Font-family in the...
Hi everyone. I have been unable to set the focus back to a control (i.e., textbox) after validating. Once the textbox fails the validation event, I pop an error message, but then I can't seem to set the focus back there. Any help is appreciated.
Hi.
I have an application with a global array of objects (Routes). In a function, I declare a local route:
Dim RouteLocal as Route
Set RouteLocal = New Route
I then assign a value (a route) from my global array to the local route:
Set RouteLocal = gRtPd(ndx)
When I manipulate a value in...
I have an MDI form containing 3 child forms. The child forms each contains a FlexGrid. There is a datepicker control on one of the forms. When the date is changed I want to refresh the data in all of the FlexGrids. The only way I have been able to do this is to unload the forms and reload them...
What are people's opinions about whether it's worthwhile to ditch the MSHFlexGrid and use a third-party control like True DBGrid Pro? Is it worth the learning curve time??
Hi. I'm a newbie to the FlexGrid. I am simply trying to capture a user selection from a mouse-click, and then work with that data. 1)What's the easiest way to capture the user-selection (with SelectionMode set to Row or Free). 2) When I try to use the FlexGrid_Click() event I get an...
I have an MDI Child form inside a parent. I can't get the child form to position flush left on the parent form. There is a margin about 400 twips wide on the left. I have tried everything, including setting the child form's left property to negative numbers. Anyone know how I can get this child...
Does anyone know if there's a way, using ADO from VB, to connect to a SQL Server db, and execute a stored procedure, passing it a parameter, and open up an UPDATEABLE client-side cursor in VB? As far as I can see, in order to pass a parameter to a stored procedure, you must use the ADO command...
Is there a way to clear the debugger (immediate window) without closing and reopening the application? Each time I run the application, it would be nice to start with a clear immediate window.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.