The text file needs to be on the SQL server Is CF and MS-SQL on the same box? If not, you will need to get the text file onto the SQL Server.
On 4/23/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: > > Following on from my query this morning about the stored proc, I've > started > dabbling with the query in CF to start with, just as it feels more > familiar. > > > > I'm struggling to get the following piece of code working though: > > > > <cfquery name="qCommitLogs" datasource="MyDSN"> > > BULK INSERT DeviceStaging > > FROM 'D:\test.txt' > > WITH (FIELDTERMINATOR = ',') > > </cfquery> > > > > <p>Done</p> > > > > This just returns a blank page, no error messages and nothing gets > inserted > into the database table. Both the TXT file and DeviceStaging are 4 columns > and the datatypes appear to match. > > > > 00:00:00:00:00,1,2007-01-01 12:00:00,1 > > 00:00:00:00:00,1,2007-01-01 12:00:00,1 > > 00:00:00:00:00,1,2007-01-01 12:00:00,1 > > 00:00:00:00:00,1,2007-01-01 12:00:00,1 > > 00:00:00:00:00,1,2007-01-01 12:00:00,1 > > > > Columns are: > > > > MacAddress Varchar(50) > > Port TinyInt > > DateTime DateTime > > Class TinyInt > > > > Any ideas on where to started with this? > > > > Thanks, > > > > Rob > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276012 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

