MySqlDataSourceItem...?


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K 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 (103 views, 7.00 KB)
Reply
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Peter,

Well, I am an independent consultant, I sell solutions to my customers, and many of them already have a database working on a hosting ISP and I have no choice other than provide them with a solution with the current database.  In this particular case, the application reads some data from VFP tables which it works pretty well with SF since there is full support for it in DDT & BOM, and then updates a MySQL database which is hosted on the web and is used by a php website.

I tried to convince the customer to use MS-SQL Express and probably replace the php solution with an ASP.Net/SF solution, but budget is not available to replace what is working for them already.

Bottom line is that as a consultant either we deliver the solution or the customer will look for somebody else.

MySQL is a very popular database and I bet you that SF will get more customers to buy SF if support for it is added.  Currently DDT & BOM supports MS-Access & ORACLE, that is nice, but who is seriously using MS-Access? we have been asking for MySQL support for over a year and even though Trent saids it is in the list of things to add to SF version x the reality is that we don't know when this will happen and projects are just being dumped. Crying

Sorry for show up my frustration in this matter.

Edhy Rijo

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