Jump to content
Software FX Community

Connecting to SQL-Server / Configure parameters in query


DRi

Recommended Posts

Hello everybody,

I've a question about building a sql-query with parameters. If I use a parameter in my query with the "@" like shown in the QuickGuide and click on Next-button the Program crashes.

Can anybody help me?

As mentioned in the QuickGuide it should show the "Configure Parameters"-Dialog instead of crashing. 

My query looks like "Select sales from Agents where brokerage_id=@myParam"

Link to comment
Share on other sites

Can you please post the version of PowerGadgets.CreatorMobile.exe? You should be able to view this in Windows Explorer right clicking the exe.

Also please tell us the SQL server version you are using and the type of the brokerage_id field to see if we can duplicate the issue.

Regards,

JuanC

Link to comment
Share on other sites

Hi JuanC,

my Version of PowerGadgets.CreatorMobile.exe is 2.0.4309.32062. I'm using SQL-Server Express 2008 R2.

Type of the field in this case is a "uniqueidentifier" but it also crashes if I use a "nvarchar"-field with the parameter.

There's no difference what type of field I use with the parameter, it's always crashing.

Without using any parameter everything is fine and there's no crash.

 

Thanks for checking this.

Regards,

DRi

Link to comment
Share on other sites

We recently fixed an issue related to parameters of type "uniqueidentifier" but it showed as a hang instead of a crash.

Are you using a non-english windows version?Can you confirm that it also crash if trying to use a parameter with an integer/long column?Do you get any additional information (exception, stack, etc.) when the app crashes?

Regards,

JuanC

Link to comment
Share on other sites

This is right it's a hang of the program, unfortunately I'm getting no additional information about the error. 

I'm using a german version of windows.

The Application also hangs if I try to use a parameter with interger/long column. It hangs with all types of columns.

 

Regards,

DRi

Link to comment
Share on other sites

We have been unable to duplicate this error in other localized windows versions.

In the mean time can you try running a "Command Prompt", change the current directory to the PG installation folder (typically \Program Files\PowerGadgets 2.0) and execute the following command

 PowerGadgets.CreatorMobile.exe /_language:en-US

This language parameter allows you to run PG with other supported languages, you probably will not see any difference as we do not provide a german localization but there is a small chance it might fix the hang when using parameters

This issue is because we are not aware of a .NET API to detect the SQL parameters (names, types, etc.) so we handle exceptions thrown by the .NET framework and it seems in your case these exceptions are probably been localized.

Note that the build you are using will hang when using uniqueidentifier fields as a parameter even if the language parameter takes care of the hang with other parameter types, we already fixed this issue internally and our next public build will fix this.

We will research an alternative method where we prompt you for the parameter types.

Regards,

JuanC 

Link to comment
Share on other sites

Hey JuanC,

if I start the PowerGadgets.CreatorMobile.exe with language-Parameter it doesn't fix the hang. 

But if I connect to a SQL-Server 2005 Instance instead to 2008 R2, then Parameters in querys work fine.

So do you have any differences in connecting to other versions of SQL-Server?

Regards,

DRi 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...