Sir
I have to import flat file into mssql 2019
But I have created stored procedure to import .txt file using asp.net page
I have fixed path and file name. Its working fine.
I need advice how to do ,user select folder and file name dynamically
It is my Code
insert into [dbo].[ZZ_Flat_Data]
(CoCode, CoName, CoAddress1, CoAddress2, CoAddress, CoPost, SPeron, Transporter, DocDate, DocNo,
Category, Amount, Type)
SELECT * FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0', 'Text;Database=C:\textfiles; ',
'SELECT CoCode, CoName, CoAddress1, CoAddress2, CoAddress, CoPost, SPeron, Transporter, DocDate, DocNo,
Category, Amount, Type FROM test.txt')
Pls advice me
thank you
Maideen