SSIS - link to dbf table with parameter & import only new data
hello, I am new at this forum & ssis i have : a. sql 2008 evaluation b. Foxpro database where I connect via SYS2000.DBC file. Actual database files extensions are .dbf Main purpose: I want to import new data only on daily bases from specified table. I do not want import whole table every time. Currently I can connect to DBF table via ADO NET ODBC. That is fine if I import whole table every single time. (at least to my knowledge) I have googled that OLE DB lets set parameters; however, I am not able to connect to DBF table via OLE DB> Please help
January 21st, 2011 1:05pm

You must be able to use ADO to get to where you need; I guess you determine what to import based on a SQL query, in this case why don't you create an Execute SQL Task in DFT and pass the parameters as described here: http://decipherinfosys.wordpress.com/2008/03/29/running-parameterized-sql-commands-using-the-execute-sql-task-ii/Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 1:57pm

I want to import new data only on daily bases from specified table. I do not want import whole table every time. iF U have some fields like dat_insert and dat_update it is possible - else NO There is VFPOLEDB - u need install it bit I did nt use it with SSIS
January 21st, 2011 2:21pm

many thanks. initial stage is complete. however, if i click on parameters i get message below: TITLE: Microsoft Visual Studio ------------------------------ Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable. ------------------------------ ADDITIONAL INFORMATION: Provider cannot derive parameter information and SetParameterInfo has not been called. (Microsoft OLE DB Provider for Visual FoxPro) ------------------------------ BUTTONS: OK ------------------------------
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2011 2:34pm

Did you map the parameters properly (looks like they cannot be parsed), e.g. did you use the "?" ?Arthur My Blog
January 21st, 2011 2:39pm

I appologize for foolish questions; however, i fail to follow instructions. In general, I have the same issues with variable data types. Neither date nor char work for me. I just want to run a simple test to see if parameters work. I have tested 2 queries on conenction type OLE DB & ADO.NET: SELECT JOBID FROM dbo.tt_arch where jobid = ? or SELECT calldate FROM dbo.tt_arch where calldate > ? i have failed to succeed because of job Error: The type of the value being assigned to variable "User::jobid" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. [Execute SQL Task] Error: Executing the query "SELECT jobid AS Expr1 FROM dbo.tt_arch..." failed with the following error: "Failed to create an IDataAdapter object. This provider may not be fully supported with the Execute SQL Task. Error message 'ERROR [42S02] [Microsoft][ODBC Visual FoxPro Driver]File 'dbo.tt_arch' does not exist.'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. My data source is DBF (foxpro) & destination is SQL Server. Ideally, i wish to import data starting from last date in SQL table copy.
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 8:35am

I did use SELECT JOBID FROM dbo.tt_arch where jobid = ? and i received data types problems Thanks
January 24th, 2011 8:51am

What is the data type for JobID you are passing in? Why not to accept the parameter, then convert it into whatever works inside the Execute SQL Task?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 9:57am

JobID is string calldate is datetime SELECT calldate FROM dbo.tt_arch where calldate > ? I have to admit is it my 1st project with variables. I do have book & tutorials open. However, i fail somewhere.
January 24th, 2011 3:18pm

JobID is string calldate is datetime SELECT calldate FROM dbo.tt_arch where calldate > ? I guess JobID expects a numeric value, if so why don't you convert it?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 3:27pm

ok. I have done something new. 1. I have created a table with 2 columns that states lastmodified & table name. 2. i have inserted values TableName MITC_Archive_Call LastModified 2010-12-18 00:00:00.000 3. exec sql statment - that should give me last update on specific table. select LastModified from tadas where TableName = 'MITC_Archive_Call' 4. data flow uses SQL command from variable & looks like this SELECT calldate, callerid, calltime, calltype, empid, jobid, port FROM tt_arch WHERE calldate < @[User::lastdate01] 4.1 [User::lastdate01] is a variable name from result set (result name is Last Modified) According to the book it should work; however, i get a error below. TITLE: Microsoft Visual Studio ------------------------------ Error at Data Flow Task [OLE DB Source [1]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Visual FoxPro" Hresult: 0x80040E14 Description: "Missing operand.". ------------------------------ ADDITIONAL INFORMATION: Exception from HRESULT: 0xC0202009 (Microsoft.SqlServer.DTSPipelineWrap) ------------------------------ BUTTONS: OK ------------------------------
January 24th, 2011 3:47pm

SELECT calldate, callerid, calltime, calltype, empid, jobid, port FROM tt_arch WHERE calldate < @[User::lastdate01] the part in bold is incorrect for Execute SQL Task It needs to be SELECT calldate, callerid, calltime, calltype, empid, jobid, port FROM tt_arch WHERE calldate < ? The ? must be mapped to your @[User::lastdate01] variable.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
January 24th, 2011 3:58pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics