Thursday, March 29, 2012
Getting a error in DTS Active x script
I'm trying to update three fields in one table from an import table. Is the anything you see missing in my code:
Dim rs1, strSQL
strSQL = "Select safety_valve_cap, hydro_date, hydro_psi, state_No From HBC_ZImport"
set rs1 = objConn.Execute(strSQL)
Do While NOT rs1.EOF
strSQL = "Update HBC_Boiler_Inspection set Safety_Valve_Cap = '" & rs1 ("Safety_Valve_Cap") & "', "
strSQL = strSQL & " Hydro_PSI = '" & rs1 ("Hydro_PSI") & "', "
strSQL = strSQL & " Hydro_Date = '" & rs1 ("Hydro_Date") & "' "
strSQL = strSQL & " where Boiler_ID = (Select ID from HBC_Boiler where State_No = ' " & rs1 ( "State_No") & " ') & " ' "
objConn.Execute(strSQL)
rs1.MoveNext()
Loop
Function Main()
Main = DTSTaskExecResult_Success
End FunctionLook at http://dbforums.com/t673820.html
Hugh Scott
Originally posted by Bigced_21
Can anybody help me with this?
I'm trying to update three fields in one table from an import table. Is the anything you see missing in my code:
Dim rs1, strSQL
strSQL = "Select safety_valve_cap, hydro_date, hydro_psi, state_No From HBC_ZImport"
set rs1 = objConn.Execute(strSQL)
Do While NOT rs1.EOF
strSQL = "Update HBC_Boiler_Inspection set Safety_Valve_Cap = '" & rs1 ("Safety_Valve_Cap") & "', "
strSQL = strSQL & " Hydro_PSI = '" & rs1 ("Hydro_PSI") & "', "
strSQL = strSQL & " Hydro_Date = '" & rs1 ("Hydro_Date") & "' "
strSQL = strSQL & " where Boiler_ID = (Select ID from HBC_Boiler where State_No = ' " & rs1 ( "State_No") & " ') & " ' "
objConn.Execute(strSQL)
rs1.MoveNext()
Loop
Function Main()
Main = DTSTaskExecResult_Success
End Function
Monday, March 26, 2012
GetIUMS dll error
Nearly when I want to Import data to my Database the below error is ishown:
http://eliasoft.europe.webmatrixhosting.net/Sqlq/GetIUMS01.gif
http://eliasoft.europe.webmatrixhosting.net/Sqlq/GetIUMS02.gifhttp://forums.windrivers.com/showthread.php?t=58747
Monday, March 19, 2012
Get trailing spaces when import data from FoxPro
We have a problem regarding the Visual FoxPro OLEDB driver. When we import data from FoxPro into SQLIS using Microsoft OLE DB Driver for Visual FoxPro, all string fields get spaces upto the it's field length.
Example:
Column A has a length of 10 characters. If we insert "bob" into that field in FoxPro and then read it from FoxPro and store it into SQL server. The resulting value in column A in SQL Server will be "bob ".
We are reading data from booth Visual Fox Pro and FoxPro using the same driver, we can't seem to find any OLE DB driver for FoxPro.
We have a solution which is to trim all the fields before storing them in SQL Server, but that we give us ALOT of work.
Is there anyone who has experienced the same problem and has an more elegant solution?Have you considered using the Derived Column transform in the data flow to trim your string columns?
Thanks.|||We have considered that solution, but that is our last option, as we have 50 tables and about 5-10 string columns in each... :(
So if there are anyone out there who has experienced the same problem with FoxPro and who has figured out some nice solution with the driver. We would highly appreciate to take advantage of your experiences..
Best regards,
Mattias