|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
passing global vars into SQL2K
using VB, have a global variable -> busDate
using a recordset, the query is: SQLQuery3 = "CREATE TABLE [WBS].[dbo].[sgrp_temp] ([Rpt_Level] int NULL,[BusDate] smalldatetime DEFAULT 'busdate',[Number] int NULL, [Desc] varchar (20) NULL,[SysDate] smalldatetime DEFAULT getdate(),[AutoNbr] uniqueidentifier)" rstAll.Open SQLQuery3, cnWBS the problem is the DEFAULT declaration for BusDate, I'm not getting the value of the variable passed in. The default for SysDate does work. How should the global var be referenced? Comments appreciated Thanks RK |
|
#2
|
|||
|
|||
|
have also tried the following, creating the connection etc all done before. The error is that the item is not found in the collection
Cmd.CommandText = "CREATE TABLE [WBS].[dbo].[sgrp_temp] ([Rpt_Level] int NULL,[BusDate] smalldatetime DEFAULT '?',[Number] int NULL,[Descript] varchar (18) NULL,[Ct] decimal (2,0) NULL,[Amount] smallmoney NULL,[SysDate] smalldatetime DEFAULT getdate(),[AutoNbr] uniqueidentifier)" Cmd.Parameters.Refresh Cmd.Parameters(0) = BusDate |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > passing global vars into SQL2K |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|