Search found 13 matches

by MrBishop
Fri 21 Jan 2011 20:32
Forum: dotConnect for MySQL
Topic: Question on ASP.Net Membership table: migrating to MS SQL
Replies: 2
Views: 1466

Shalex wrote:So try leaving the PasswordSalt fields blank when migrating.
This was it, after putting an empty string in the PasswordSalt column, it works.

Thanks!
by MrBishop
Wed 19 Jan 2011 14:23
Forum: dotConnect for MySQL
Topic: Question on ASP.Net Membership table: migrating to MS SQL
Replies: 2
Views: 1466

Question on ASP.Net Membership table: migrating to MS SQL

I've got a project using the ASP.Net membership provider for MySQL that we're migrating to MS SQL. This uses an older version of dotConnect, before the password salt feature was added; however, when I set up the MS SQL tables, it looks like the passwordsalt field in the membership table is required.

Is there a known salt that dotConnect uses by default that I can use, or am I going to have to re-generate passwords for all the users?

Thanks,
Michael
by MrBishop
Thu 05 Jun 2008 13:04
Forum: dotConnect for MySQL
Topic: Could not load type ...MySqlMembershipProvider
Replies: 2
Views: 2432

Ok, it turns out that, even though I had added references to the CoreLab assemblies in the project, they weren't set to "Copy Local". After setting that property to true for those assemblies everything worked again.
by MrBishop
Wed 04 Jun 2008 16:16
Forum: dotConnect for MySQL
Topic: Could not load type ...MySqlMembershipProvider
Replies: 2
Views: 2432

Could not load type ...MySqlMembershipProvider

I started a new Web Application Project in VS 2008 (DotNet 2.0). I copy/pasted my web.config and have a couple basic pages set up. Everything compiled fine, but when I went to test it, I received the following error:

Code: Select all

"Could not load type 'CoreLab.MySql.Web.Providers.MySqlMembershipProvider'."
Through trial and error, I found that if I comment out each of the sections in my roleManager, profile, and membership sections in web.config, my web app runs fine. However, if I leave them in, for each section I'll run into an error about not being able to load MySqlMembershipProvider, AspNetMySqlProfileProvider, etc.

I have references to CoreLab.Data, CoreLab.MySql, and CoreLab.MySql.Web. Also, this exact same config file works fine in another project (Web Site project that was upgraded from VS 2005 to 2008).

Here are the relevant parts of my config file. Some things are commented out from just trying different things.:

Code: Select all

	
		
	

...

		
			
			
		
		
			
		
		
			
				
				
			
		
		
			
				
			
		
		
			
                
                
				
			
		
by MrBishop
Wed 14 May 2008 02:07
Forum: dotConnect for MySQL
Topic: Technical questions about upgrading
Replies: 1
Views: 1676

Technical questions about upgrading

I'm considering upgrading from 3.55 to 4.0 in the very near future, and have a couple of quick questions.

I have several small projects in 3.55, what is involved in updating my code for 4.0? Most of the MySql-specfic code is hidden behind a common db interface, ie:

Code: Select all

public static DbConnection Connection
{
    get { return new MySqlConnection(); }
}
But there are still several places where I'm using MyDirect features. So, just wondering how much of that I'll have to review/re-code.

Second, can I run 3.55 and 4.0 side by side on the same development and user machines? If upgrading is trivial, this might not be an issue, but I may not have time to convert all my projects immediately, so I'd like to keep 3.55 around in case there are any problems.

Thanks,
Michael[/code]
by MrBishop
Tue 30 Jan 2007 15:04
Forum: dotConnect for MySQL
Topic: SQL Reporting Services
Replies: 22
Views: 11544

I'm not using Reporting Services (at this time), but would the fix you mentioned also apply to my question in this thread: http://www.crlab.com/forums/viewtopic.php?t=8750?
by MrBishop
Fri 05 Jan 2007 17:45
Forum: dotConnect for MySQL
Topic: Distributing CoreLab.MySql.dll with an app
Replies: 3
Views: 2571

Oops, missed that part. Thanks, Alexey.
by MrBishop
Thu 04 Jan 2007 15:10
Forum: dotConnect for MySQL
Topic: Distributing CoreLab.MySql.dll with an app
Replies: 3
Views: 2571

Distributing CoreLab.MySql.dll with an app

When distributing my app to my client, I've been asking them to just run the CoreLab installer with the Minimal installation checked, as noted that I can do in the documentation. I'd really like to be able to just send the dll along with an app.config file (if necessary) to make it easier for the end user (I'm mainly thinking about when MySQLDirect gets upgraded).

I've found that if I manually modify the machine.config, my code will pick up the MySQLDirect provider with no problem just by providing the dll by adding this line:
However, I've been playing around with app.config, and can't seem to get it right, I always get an error along the lines of "MySQLDirect factory not found" here:

Code: Select all

return DbProviderFactories.GetFactory( CurrentFactory );
As I said, everything works great if I have the user run the install, or manually modify machine.config, but I would appreciate some guidance on adding MySQLDirect to the factory list on a per-app basis.
by MrBishop
Fri 03 Nov 2006 23:21
Forum: dotConnect for MySQL
Topic: Problem updating BlOB field
Replies: 8
Views: 2868

Ok, I got it to work. It turns out that I had my max_allowed_packet_size set too low in MySQL. What was throwing me off was that the sample worked, but my program didn't, so I didn't think it was a problem with the database.

Anyway, Alexey, thanks for the help.
by MrBishop
Thu 02 Nov 2006 18:24
Forum: dotConnect for MySQL
Topic: Problem updating BlOB field
Replies: 8
Views: 2868

Sent.
by MrBishop
Wed 01 Nov 2006 14:56
Forum: dotConnect for MySQL
Topic: Problem updating BlOB field
Replies: 8
Views: 2868

Thanks for the reply. I've seen the sample, and it does work. But, it does everything using DataSets. My project is using a custom object to bind one record at a time to a form. I already have the whole project written to use parameterized SQL commands for inserts and updates, I really didn't want to have to rewrite that part using DataSets, I'd prefer to know what's not working with my code.
by MrBishop
Tue 31 Oct 2006 22:38
Forum: dotConnect for MySQL
Topic: Problem updating BlOB field
Replies: 8
Views: 2868

After posting, I found the thread a few spaces down titled "Net packets out of order / Connection closed during query", which seems very similar to my problem. With regard to these suggestions:
1. Make sure you close all data readers explicitly.
2. If you use Prepare() method of MySqlCommand class, call Dispose() after closing reader.
3. If you use connection pooling, call MySqlConnection.Ping() method before MySqlConnection.Open().
4. If above doesn't help and you use connection pooling, check if you can turn connection pooling off.
1. I'm doing this currently.
2. I don't use Prepare(), but am calling Dispose() on all my Commands (on everything that exposes Dispose, actually).
3. I tried this, but got an exception because the Connection wasn't open. I tried Open'ing the connection first; didn't fix the problem.
4. I'd rather not disable pooling just for this.

I also tried setting Direct to false in the connection string, that didn't help.
by MrBishop
Tue 31 Oct 2006 19:48
Forum: dotConnect for MySQL
Topic: Problem updating BlOB field
Replies: 8
Views: 2868

Problem updating BlOB field

I just added a MEDIUMBLOB column to my contacts table for saving images. However, when I try to update a record, I get the following exception:

(CoreLab.MySql) Lost connection to MySQL server during query.

I'm trying to save a Byte[] to the field, using this code:

Code: Select all

// Put Byte[] in data field
MemoryStream    stream = new MemoryStream();

pboxMap.Image.Save( stream, 
  System.Drawing.Imaging.ImageFormat.Bmp );
farm.Map = stream.ToArray();

// Create a parameter and add to the DbCommand
DbParameter param = GenerateParameter( "Map", farm );
param.Size = farm.Map.Length;
cmd.Parameters.Add( param );

private DbParameter GenerateParameter(
  string       name,
  FarmInfo  farm
  )
{
  PropertyInfo    property = FARM_TYPE.GetProperty( name );
  DbParameter     parameter = GenericDbFactoryHelper.Parameter;

  parameter.ParameterName = "@" + name;
  parameter.Value = property.GetValue( farm, null );

  return parameter;
}
The update worked fine before I added this field, but I really don't know where to begin with this particular error. I know that the Byte[] is good because I can use it to display the image as such:

Code: Select all

MemoryStream    stream2 = new MemoryStream( farm.Map );
pboxMap.Image = new Bitmap( stream2 );