Intuit Financial Community: File Creation Problem - Intuit Financial Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

File Creation Problem

#1 User is offline   Preston Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 02-December 01

Posted 05 February 2002 - 09:32 AM

Hello,
I'm attempting to use the OSDI toolkit to import our existing data into the FX module to fill in the T5Detail forms, however I can't get beyond "Invalid file" x(
Here's a clipping of my VB code... (the query is good and the recordset is populated).


-------------------------------------------

Dim FXModule As Profile.T2000FXModule
Dim FXFileObj As Profile.T2000FXFile
Dim FXClient As Profile.T2000FXClient
Dim rsT5 As Recordset
Dim intCount As Integer

Set FXModule = CreateObject("Profile.T2000FXModule")
Set FXFileObj = CreateObject("Profile.T2000FXFile")
Set FXClient = FXFileObj.Client

strQuery = " SELECT ("blah...")

Set rsT5 = deAppShares.cnAppShares.Execute(strQuery)

Rem If there are any records to create...
If Not (rsT5.BOF And rsT5.EOF) Then
rsT5.MoveFirst
Rem Create the same number of T5 Slips as there are records
FXClient.TableItemCount("T5DTable", 0) = rsT5.RecordCount

Rem Fill in the fields on the T5 Slips going row by row in the spreadsheet
intCount = 0
Do While Not rsT5.EOF
Rem Actual Dividend amount
If rsT5("amount") <> "" Then
FXClient.Field("T5DTable[" & intCount & ",1]") = rsT5("amount")
End If

Rem SIN
If rsT5("SIN") <> "" Then
FXClient.Field("T5DTable.S[" & intCount & ",0]") = rsT5("SIN")
End If

Rem Last name
If rsT5("last_name") <> "" Then
FXClient.Field("T5DTable.S[" & intCount & ",1]") = rsT5("last_name")
End If

("ETC...")

Rem Next employee
intCount = intCount + 1
rsT5.MoveNext
Loop

Rem Save the file as a ProFile FX data file
FXFileObj.SaveFile ("C:Program FilesProfile2001FXSampleT5Info.GFX")

End If

-------------------------------------------

When this is run, a file is created in the proper location but when I try to open it with ProFile, I get the message "Invalid File".
**** Perhaps something worth noting : If I hand enter data into the T5Detail forms and save, then the file type has the extension ".01x" not ".GFX".
Any suggestions would be greatly appreciated. :P

Preston
0

#2 User is offline   Guest Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 0
  • Joined: 03-November 01

Posted 05 February 2002 - 04:42 PM

Preston:

The file extension does need to be changed to the year which you are creating the files for (in this case .00T) as you are using the 2000 dll file in your VB code. When you try to open the file you are creating, Profile tries to open it in the 1999 module, as that was the extension used in 1999.

Changing the extension should clear up the problem. If that does not work feel free to contact me.

Carl Jensen
Development Team
Intuit Greenpoint Software
0

#3 User is offline   Preston Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 02-December 01

Posted 06 February 2002 - 07:29 AM

That was it!!!!
It's always something simple.

Guaranteed, no more that 3 minutes to patch my app, and voila, everything imported.:7 :7 :7 :7 :7
Thanks
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users