MySqlDataSourceItem...?


Author
Message
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Well the day has come BigGrin

I have a small project and have to be done with MySQL no other way around.  Based on Trent suggestions I created a MySQLDataSourceItem.vb class using the SQLDataSourceItem.vb class in SF source code.

I basically replaced all MS-SQL commands with their counterpart for MySQL but of course I started to hit some blocks, for now the GetDataTable() method is not working, it uses a SqlDependency() object which I have not been able to find a substitute for MySql

''' <summary>

''' Executes the given command on the data source and returns the results.

''' </summary>

''' <param name="Command"></param>

''' <param name="CallBack"></param>

''' <returns></returns>

''' <remarks></remarks>

Public Overloads Overrides Function GetDataTable(ByVal Command As System.Data.Common.DbCommand, ByVal CallBack As OnChangeEventHandler) As System.Data.DataTable

'-- Establish locals

Dim loDep As SqlDependency

'-- Add the handler to the dependency

If CallBack IsNot Nothing Then

loDep = New SqlDependency()

AddHandler loDep.OnChange, CallBack

loDep.AddCommandDependency(CType(Command, SqlCommand))

Try

'SqlDependency.Start(Command.Connection.ConnectionString)

SqlDependency.Start(CreateBlankDbConnection().ConnectionString)

Catch ex As Exception

MsgBox(ex.Message)

End Try

End If

'-- Execute the command

Return MyBase.GetDataTable(Command, CallBack)

End Function

I would appreciate if somebody could take a look at this class (attached) and help out getting this to work. 

I am using the MySQL .Net Connector which it is working just fine from the Server Explorer in VS2010, I am able to connect to the database and see the tables.  In order to use the BOM I had to create a dummy DDT project to map the BO from the BOM.  At this point I am just trying to read the MySQL table, but I also will need to update it as well.

Trent, Dustin, Steve, please we really, really, really need more commitment to the SF community and the framework. Pinch

Edhy Rijo

Attachments
MySqlDataSourceItem.zip (90 views, 7.00 KB)
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