I'm doing this on SQLServer Express 2005, but don't think it makes that much difference:

I used a catalog called NCS, the file I want to insert [Russian Unicode] is called unitest.txt, and I create a table named N_MaxText... so I leave it up to you to insure the path/filename and that the table does not already exist. Note: for future posts in this forum... very difficult to provide working code for 'servers'... too many differences

Step 1: using OLEDB, set up connection and create table

[vba]
adExecuteNoRecords = 128
cConn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=,\SQLEXPRESS;Initial Catalog=NCS"
Set oConn = CreateObject("ADODB.Connection")
oConn.CommandTimeOut=0
oConn.Open(cConn)
cSQL = "CREATE TABLE [dbo].[N_MaxTest] ( [NMaxVar] NVARCHAR(MAX) NOT NULL );"
oConn.Execute cSQL, ,adExecuteNoRecords
[/vba]


now insert file into table using an ADODB Stream Object (and if you have a better way to insert it as unicode w/out a stream let me know)

[vba]
cFile = "[yourpath]\unitest.txt"
Set oRS=CreateObject("ADODB.Recordset")
Set oS=CreateObject("ADODB.Stream")
oS.Type=2
oS.Open()
oS.LoadFromFile(cFile)
oS.Position=0
oRS.Open "[dbo].[N_MaxTest]",cConn,1,3,2
oRS.Addnew
oRS.collect("NMaxVar")=oS.ReadText()
oRS.Update
oRS.Close
Set oRS=Nothing
oS.Close
Set oS=Nothing
oConn.Close
Set oConn=Nothing
[/vba]

and there you have it, your have inserted a paragraph of Pushkin poetry into a Unicode field.

So, the test.... hmmmm ... you give me code I can use to extract that field, and place it into Excel as both russian and english [via Google's weak Beta translation... that code in the workbook I posted in the previous thread that got us here]. I am re-posting the pushkin unicode... just unzip.

Stan