ConnectionString error


Author
Message
Marcel Heitlager
Marcel Heitlager
StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)StrataFrame User (274 reputation)
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
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I figured, however, that this would allow you to add another one to your, "They shouldn't be allowed to use our framework, if:" list. [BigGrin]




LOL...the thought NEVER crossed my mind...we have all been there! When you get in the heat of the battle sometimes you just resort to "getting the job done" and so I totally understand!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search