Salve a tutti,
premetto che non sono ferratissimo nella programmazione, però diciamo che me la cavo.
Comunque vi presento il problema:
Ho un Db Access in cui dovrò implementare nuove funzionalità. Queste nuove funzioni si baseranno su dei dati che dovrò importare mensilmente. Dati che saranno contenuti in un txt di quasi 3gb ( e che aumenta nel tempo) . Da quanto ho capito con Access non ho speranze, per cui vorrei sapere come posso fare a importare in SQL Server questo file e aggiornarlo mensilmente e come avviare la procedura dal DbAccess.
Al momento ho creato il mio DB in SqlServer e creato questa query di importazione:
questo invece è la strutture del formatfilecodice:USE mioDbSQL; GO DELETE dbo.miaTabella; GO BULK INSERT dbo.miaTabella from 'C:\FileDaImportare.txt' with ( formatfile = 'C:\FormatFile.fmt'); GO SELECT * FROM dbo.Miatabella; GO
codice:10.0 14 1 SQLCHAR 0 3 "" 1 IDMAR Latin1_General_CI_AS 2 SQLCHAR 0 3 "" 2 IDMOD Latin1_General_CI_AS 3 SQLCHAR 0 3 "" 3 IDVER Latin1_General_CI_AS 4 SQLCHAR 0 20 "" 4 PARNO Latin1_General_CI_AS 5 SQLCHAR 0 4 "" 5 IDPAR Latin1_General_CI_AS 6 SQLCHAR 0 1 "" 6 TPPAR Latin1_General_CI_AS 7 SQLCHAR 0 4 "" 7 IDSIM Latin1_General_CI_AS 8 SQLCHAR 0 30 "" 8 ULTDS Latin1_General_CI_AS 9 SQLCHAR 0 40 "" 9 PECOS Latin1_General_CI_AS 10 SQLCHAR 0 100 "" 10 COLOR Latin1_General_CI_AS 11 SQLCHAR 0 12 "" 11 PRZLI Latin1_General_CI_AS 12 SQLCHAR 0 1 "" 12 STSPN Latin1_General_CI_AS 13 SQLCHAR 0 4 "" 13 IDGRU Latin1_General_CI_AS 14 SQLCHAR 0 1 "" 14 Tappo Latin1_General_CI_AS
Ovviamente qualcosa non va perchè mi restituisce questo errore:
Vi ringrazio per ogni aiuto e consiglio http://www.tomshw.it/forum/dkstyles/smilies/thanks.gifcodice:(0 row(s) affected) Msg 4832, Level 16, State 1, Line 1 Bulk load: An unexpected end of file was encountered in the data file. Msg 7399, Level 16, State 1, Line 1 The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error. Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)". (0 row(s) affected)

Rispondi quotando
