Page 1 of 1

Compiler initialization failed unexpectedly error is coming

Posted: Mon Apr 04, 2016 4:50 pm
by vivek.guvva
Hi,
I have written a function for connect to hadoop database in VB.net. When i try to execute the function, am getting the error "Compiler initialization failed unexpectedly: The filename, directory name, or volume label syntax is incorrect"
When I try to build/rebuild a solution, it is not throwing any error. Please let me know when might be the issue. Below is the function.

Public Shared Sub HaddopConnection()
Dim dateID As String = ""
Dim d as System.DateTime = Convert.ToDateTime(System.DateTime.Now.ToString())
Dim weekname As String = System.DateTime.Now.DayOfWeek.ToString()


If weekname = "Friday" OrElse weekname = "Saturday" OrElse weekname = "Sunday" Then
d = d.AddDays(-3)
End If

dateID = d.ToString("yyyy/mm/dd").Replace("/","")
Dim conn As OdbcConnection = New OdbcConnection("DSN=TestDB")
conn.Open()
report.Log(reportlevel.Success,"Hadoop connection is oepened")
Dim getDateID as String = "select max(dateid) as dateid from mconnect.di_date where weekid = 201613"
Dim cmd As OdbcCommand = New OdbcCommand(getDateID,conn)
Dim adp As OdbcDataAdapter = New OdbcDataAdapter(cmd)
adp.Fill(dateIDDT)
report.Log(reportlevel.Success,"Date table is filledup")
'report.log(reportlevel.Success, dateIDDT)
conn.Close()
End Sub