Similar Threads
1. displaying previous date ranges based on user input date (date parameter)
Novice Crystal 9.0 user here. I'm creating a Project/task report by
consultant with subtotals and totals where the user enters a customer
and date range that was setup using Crystal date parameters and I need
to use the date range entered to calculate and display the previous
week(s), up to at least 3 previous weeks on the same report as well.
How can I get the previous weeks on the report?
bls
2. Problem with Date type parameter - VB Crystal Report
3. Parameter.Type is adVarchar for CHAR parameters of SQL Server Stored Procedure
Hi All,
I am using SQL Server 7 and Visual Basic 6. SQL Server supports
'Provider parameter information'. When I use de Type property of a
Stored Procedure parameter that is defined as CHAR, I would expect
adChar. However, the value is adVarchar. It seems as if 'they' didn't
bother to return the exact type of parameter.
Does anybody know a work-around to distinguish CHAR from VARCHAR
parameters?
Thanks in advance,
Roel Schreurs
--------------------------------------------------------------
Example:
--------------------------------------------------------------
--SQL Server 7
alter procedure dbo.sp_T_TestParameterTypes
( @p_Char char(3)
)
as
select @p_Char
go
--------------------------------------------------------------
'Visual Basic 6
Sub Test
Dim cmdTestSP As Command
Dim par AS Parameter
Set cmdTestSP = New Command
With cmdTestSP
.CommandType = adCmdStoredProc
.CommandText = "TestParameterTypes"
.ActiveConnection = <connection>
.Parameters.ReFresh
For Each par In .Parameters
Debug.Print "Name:", par.Name, " Type:", par.Type
Next par
End With
End Sub
--------------------------------------------------------------
4. Problem with function Date() in SQL in VB
5. Problem importing Date Field into SQL DB.
I'm trying to import from a text file into a Sql DB, but I'm getting hung up
on a date field.
My text file has the date in the dd/mm/yyyy format.
I Cast that field to CDate in VB.NET, which sets it to #12/31/2005#
On my Insert, I get a SQL error from the .NET SqlClient Data provider:
"Syntax Error converting datetime from character string"
I tried not casting it as Date, which passed it into the parameter as
"2005-12-31" but that gave me the same error.
Does anyone have any ideas?
6. SQL 2000 Date Problem - VB.Net
7. SQL query and system DATE problem
Hi to all.
I have a small problem I hope someone can help me with.
I am running a sql query to a csv file. The query searches for the
total of a column between 2 dates.
This is a copy of one of the query's:
Dim SF_SMT As New OleDb.OleDbCommand("Select count(*) from
fault_records.csv where F4 = '" & lblprod.Text & " ' " & " AND F8 AND
F1 between #" & SelectproductForm.datestart & "# and #" & Now.Date &
"#", conn)
F1 contains the date.F4 is the "product" and F8 the fault code that I'm
totaling.
The query works fine(returns the correct value) if my computer regional
DATE setting is m/d/yyyy. If I change it to d/m/yyyy then the query
returns nothing. It runs , but does not return anything.
Why is this and how can I get around it.
If this software is only running on one machine it would not be to much
of a problem , but if I want to run it on various machines that may
have different DATE setting it won't work.
The software is written in vb.net
Any help would be appreciated.
Cheers
Rob
8. Excel VBA - SQL to .dbf date problem - GETTING DESPERATE