 |
|
 |
| Author |
Message |
External

Since: May 27, 2007 Posts: 3
|
(Msg. 1) Posted: Sun May 27, 2007 9:11 pm
Post subject: calling sql function in asp Archived from groups: microsoft>public>inetserver>iis (more info?)
|
|
|
Dear all,
I have a vb function converting date and "time string" to a double:
Function MKDate(d , h )
MKDate = DateSerial(Year(d), Month(d), Day(d))
If (h > "") Then MKDate = MKDate + TimeSerial(CInt(mleft(h, 2)),
CInt(mright(h, 2)), 0)
End Function
If I set this function in a module, I can make
select dt, hour, mkdate(dt, hour)
from appointments
-> It works.
Now I want to use this in asp.
If I set functions in a module, I get an error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Undefined function 'MKDATE' in
expression.
/test/dossier.asp, line 221
I also inserted this function in the .asp file, it compiles but I get
the same run-time error.
Is it possible to call this vb function in sql?
Regards,
Alain >> Stay informed about: calling sql function in asp |
|
| Back to top |
|
 |  |
External

Since: May 28, 2007 Posts: 4
|
(Msg. 2) Posted: Mon May 28, 2007 7:15 am
Post subject: RE: calling sql function in asp [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
can you use variable in the date calculations and assign to the function at
the end
xundubay
"Alain Bourgeois" wrote:
>
> Dear all,
>
> I have a vb function converting date and "time string" to a double:
>
> Function MKDate(d , h )
> MKDate = DateSerial(Year(d), Month(d), Day(d))
> If (h > "") Then MKDate = MKDate + TimeSerial(CInt(mleft(h, 2)),
> CInt(mright(h, 2)), 0)
> End Function
>
> If I set this function in a module, I can make
> select dt, hour, mkdate(dt, hour)
> from appointments
> -> It works.
>
> Now I want to use this in asp.
>
> If I set functions in a module, I get an error:
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> [Microsoft][ODBC Microsoft Access Driver] Undefined function 'MKDATE' in
> expression.
> /test/dossier.asp, line 221
>
> I also inserted this function in the .asp file, it compiles but I get
> the same run-time error.
>
> Is it possible to call this vb function in sql?
>
>
> Regards,
> Alain
> >> Stay informed about: calling sql function in asp |
|
| Back to top |
|
 |  |
External

Since: Jun 05, 2007 Posts: 1
|
(Msg. 3) Posted: Tue Jun 05, 2007 5:20 pm
Post subject: Re: calling sql function in asp [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|