This topic is locked

Bug in sql2005 byte[] guid

3/18/2008 11:51:56 PM
ASPRunner.NET General questions
N
nanohex author

Hi
I use guid's in my Sql 2005 database, the code fails as it uses byte[] instead of guid?
Jason

Eugene 3/19/2008

This bug was fixed in one of last release ASPRunner.NET

Please download and install the latest version of ASPRunner.NET (Build #171). You can get it here: http://www.asprunner.com/files/asprunnernet-setup.exe

N
nanohex author 3/20/2008

Hi Eugene
I downloaded the lastest and rebuilt the project I still get the erorrs. In the below error I use GUIDS for the 3 ids.
Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0029: Cannot implicitly convert type 'byte[]' to 'System.Guid'
Source Error:
Line 37: Friends item = new Friends();

Line 38:

Line 39: item.FriendsID = FriendsID;

Line 40: item.MembersID = MembersID;

Line 41: item.GroupsID = GroupsID;
Jason

N
nanohex author 3/20/2008

Hi
The code is generated in the "FriendsRunnerController.cs"
[DataObjectMethod(DataObjectMethodType.Insert, true)]

public void Insert(

byte[] FriendsID,

byte[] MembersID,

byte[] GroupsID,

Boolean Active,

Boolean Deleted,

Boolean Approved,

String RandomKey,

String EmailAddress)

{

Friends item = new Friends();
item.FriendsID = FriendsID;

item.MembersID = MembersID;

item.GroupsID = GroupsID;

item.Active = Active;

item.Deleted = Deleted;

item.Approved = Approved;

item.RandomKey = RandomKey;

item.EmailAddress = EmailAddress;

item.Save(UserName);

}
As you can see it treats them as byte[] but they are guids. I deleted all genereated files and regenerated the projec and still the same error.
Thank you, I hope this helps.

Jason

N
nanohex author 3/21/2008

Hi
I tried ASP Runner PRO 5 not the ASP Runner .NET and it works and creates it fine.

So it works for ASP but not .NET
Thank you, hope this helps.

Jason

Eugene 3/24/2008

I checked everything twice, but Guid woks.

Could you please send me your project (including project file, output directory and database backup) on support@xlinesoft.com? I will investigate it on my box.

N
nanohex author 3/25/2008

Hi Eugene
I found the bug, because I created the proejct in the old version it was incorrect.

I then updated the software and recomplied hte project and it still did not work.

I think loaded the project and selected a diffratn database table and that worked?

Ok so I selected the databse again and that worked.
So I assume you store a config file on the field types from the database in the proejct file

so when I loaded it in the new version it still maintained the old BYTE[].
So I got it to work by redoig the proejct from scratch and not loading the old project.
Jason