I am getting System Error when trying to execute below query from VB.NET
QueryCmd.CommandText = "select substring(substring(convert(varchar(512),textdata) ," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512),1," & _
"case" & _
"when charindex(' ', substring(convert(varchar(512),textdata)," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512)) = 0 THEN" & _
"len(substring(convert(varchar(512),textdata)," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512))" & _
"else" & _
"charindex(' ', substring(convert(varchar(512),textdata), " & _
"charindex('exec', convert(varchar(512),textdata))+5, 512))" & _
"end) as proc_name from [" + strFilename + "]"
Dim dr As SqlDataReader
dr = QueryCmd.ExecuteReader()
MsgBox("Succeeded...1")
but when trying to execute from sqlserver - its working????/
Table is created from Profiler Trace file and i am trying select query on tht
Can some one help please...??
--Deepthi. V
QueryCmd.CommandText = "select substring(substring(convert(varchar(512),textdata) ," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512),1," & _
"case" & _
"when charindex(' ', substring(convert(varchar(512),textdata)," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512)) = 0 THEN" & _
"len(substring(convert(varchar(512),textdata)," & _
"charindex('exec', convert(varchar(512),textdata))+5, 512))" & _
"else" & _
"charindex(' ', substring(convert(varchar(512),textdata), " & _
"charindex('exec', convert(varchar(512),textdata))+5, 512))" & _
"end) as proc_name from [" + strFilename + "]"
Dim dr As SqlDataReader
dr = QueryCmd.ExecuteReader()
MsgBox("Succeeded...1")
but when trying to execute from sqlserver - its working????/
Table is created from Profiler Trace file and i am trying select query on tht
Can some one help please...??
--Deepthi. V