Group: StrataFrame Users
Posts: 84,
Visits: 835
|
Hi guys,
When I call the function below, I get a "Format of the initialization string does not conform to specification starting at index 0." error at the line where I set the connection string. I'm trying to clear the SQL Server Tables on the server through ES. Since it works on a local database, what do I need to change so it will play nice with ES? Thanks.
Public Function ClearPPMTables(ByVal dbName As String) As Boolean
Using conn As New SqlConnection
conn.ConnectionString = MicroFour.StrataFrame.Data.DataLayer.DataSources(me.DataSourceKey).ConnectionString
conn.Open()
Using cmd As New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "dbo.sp_ClearTables"
cmd.Parameters.Add("@dbname", SqlDbType.NVarChar, 128)
cmd.Parameters("@dbname").Value = dbName.Trim
cmd.Connection = conn
Me.ExecuteNonQuery(cmd)
End Using
End Using
End Function
|