Compiler initialization failed unexpectedly error is coming

Experiences, small talk, and other automation gossip.
Posts: 31
Joined: Mon Feb 22, 2016 7:21 pm

Compiler initialization failed unexpectedly error is coming

Post by vivek.guvva » Mon Apr 04, 2016 4:50 pm

I have written a function for connect to hadoop database in 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")
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)
report.Log(reportlevel.Success,"Date table is filledup")
'report.log(reportlevel.Success, dateIDDT)
End Sub