Showing posts with label programs. Show all posts
Showing posts with label programs. Show all posts

Monday, March 19, 2012

Help about running SQL CE on Win CE 4.2

Hi everybody,

I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)

But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.

Here is my code :

using System;

using System.Data;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data.SqlServerCe;

namespace UmurBS.Forms.BasimSayimForms

{

publicclass bsEkleForm : System.Windows.Forms.Form

{

private System.Windows.Forms.DataGrid dg;

private System.Windows.Forms.Button button1;

private System.Data.SqlServerCe.SqlCeConnection sqlceconn;

privatestring connstr = "DATA SOURCE = UmurDB.sdf";

public bsEkleForm()

{

InitializeComponent();

}

protectedoverridevoid Dispose( bool disposing )

{

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

privatevoid InitializeComponent()

{

this.button1 = new System.Windows.Forms.Button();

this.dg = new System.Windows.Forms.DataGrid();

//

// button1

//

this.button1.Location = new System.Drawing.Point(160, 264);

this.button1.Text = "button1";

this.button1.Click += new System.EventHandler(this.button1_Click);

//

// dg

//

this.dg.Location = new System.Drawing.Point(8, 8);

this.dg.Size = new System.Drawing.Size(224, 200);

this.dg.Text = "dg";

//

// bsEkleForm

//

this.ClientSize = new System.Drawing.Size(237, 291);

this.Controls.Add(this.dg);

this.Controls.Add(this.button1);

this.Text = "bsEkleForm";

}

#endregion

privatevoid button1_Click(object sender, System.EventArgs e)

{

sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);

this.ekle();

}

privatevoid ekle()

{

try

{

SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);

sqlceconn.Open();

int rowsaffected = cmd.ExecuteNonQuery();

}

catch(Exception exc)

{

MessageBox.Show(exc.Message);

}

finally

{

if (sqlceconn != null)

if (sqlceconn.State == ConnectionState.Open)

sqlceconn.Close();

}

}

}

}

Any idea ?

Regards

Serkan

In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811

Hope this assists.

|||

Hi Erik

Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.

When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(

Thanks for any help , suggesstions.

Regards

Serkan

|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||

Hi Erik,

Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.

|||

You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:

For ARMV4i-based devices

File name File version File size Date TimeSqlce30.dev.enu.wce4.armv4i.cabNot Applicable302,36802-Apr-200615:14Sqlce30.repl.wce4.armv4i.cabNot Applicable727,81902-Apr-200615:14Sqlce30.wce4.armv4i.cabNot Applicable1,586,50102-Apr-200615:14

as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.

ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB

You may need to have a look at this as well: http://support.microsoft.com/kb/914829/

Help about running SQL CE on Win CE 4.2

Hi everybody,

I developed mobile programs for WM5.0 with C#.NET using SQL Mobile. (Visual Studio 2005, SQL Server 2005 Mobile, Mobile SDK)

But I couldn't run SQL CE on WinCE 4.2 ? (Visual Studio 2003, SQL Server 2000 CE). For example on emulator, an Insert command is running successfully. But on device (Intermec CK 31) we are getting error.

Here is my code :

using System;

using System.Data;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data.SqlServerCe;

namespace UmurBS.Forms.BasimSayimForms

{

public class bsEkleForm : System.Windows.Forms.Form

{

private System.Windows.Forms.DataGrid dg;

private System.Windows.Forms.Button button1;

private System.Data.SqlServerCe.SqlCeConnection sqlceconn;

private string connstr = "DATA SOURCE = UmurDB.sdf";

public bsEkleForm()

{

InitializeComponent();

}

protected override void Dispose( bool disposing )

{

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

this.button1 = new System.Windows.Forms.Button();

this.dg = new System.Windows.Forms.DataGrid();

//

// button1

//

this.button1.Location = new System.Drawing.Point(160, 264);

this.button1.Text = "button1";

this.button1.Click += new System.EventHandler(this.button1_Click);

//

// dg

//

this.dg.Location = new System.Drawing.Point(8, 8);

this.dg.Size = new System.Drawing.Size(224, 200);

this.dg.Text = "dg";

//

// bsEkleForm

//

this.ClientSize = new System.Drawing.Size(237, 291);

this.Controls.Add(this.dg);

this.Controls.Add(this.button1);

this.Text = "bsEkleForm";

}

#endregion

private void button1_Click(object sender, System.EventArgs e)

{

sqlceconn = new System.Data.SqlServerCe.SqlCeConnection(connstr);

this.ekle();

}

private void ekle()

{

try

{

SqlCeCommand cmd = new SqlCeCommand("insert into test (testValue) values ('hi world')", sqlceconn);

sqlceconn.Open();

int rowsaffected = cmd.ExecuteNonQuery();

}

catch(Exception exc)

{

MessageBox.Show(exc.Message);

}

finally

{

if (sqlceconn != null)

if (sqlceconn.State == ConnectionState.Open)

sqlceconn.Close();

}

}

}

}

Any idea ?

Regards

Serkan

In order to run SQL Mobile on WinCE 4.2 devices, you will have to request the following hotfix from Microsoft: http://support.microsoft.com/default.aspx/kb/924811

Hope this assists.

|||

Hi Erik

Actually I don't understand what must I do? Which files I must download? I have an Intermec CK 31 mobile device.

When I install CF 2.0 SP1 on it, I getting "not compatible" error. But completing install. But application does not run. :(

Thanks for any help , suggesstions.

Regards

Serkan

|||Which processsor architecture is your Intermec device based on - you must load the corresponding cabs for both .NET CF and SQL CE.|||

Hi Erik,

Processor is Intel XScale PXA255, 400 MHz . I think Architecture is ARM4.

|||

You need to call Microsoft support for the hotfix, for your Intermec device, you need to request the following files:

For ARMV4i-based devices

File name

File version

File size

Date

Time

Sqlce30.dev.enu.wce4.armv4i.cab

Not Applicable

302,368

02-Apr-2006

15:14

Sqlce30.repl.wce4.armv4i.cab

Not Applicable

727,819

02-Apr-2006

15:14

Sqlce30.wce4.armv4i.cab

Not Applicable

1,586,501

02-Apr-2006

15:14

as the only cab files made available for Windows CE 4.2 are for PocketPC devices, not general Windows CE 4.2 Devices.

ie: sqlce30.ppc.wce4.armv4.CAB, sqlce30.repl.ppc.wce4.armv4.CAB, sqlce30.dev.ENU.ppc.wce4.armv4.CAB

You may need to have a look at this as well: http://support.microsoft.com/kb/914829/

Friday, March 9, 2012

Help - SQL Keyword Error (SQLCODE -199)

I continue to receive an error (SQLCODE -199) on a statement that works in other sql programs. I have looked and looked at it, it looks fine to me. Can someone please look at the following code and tell me if you see any reason for the error? Object XSROLOTV1 in library GPSMODS not found. The error I receive is below.
Any help is appreciated. Thank you.

ERROR -
Object XSROLOTV1 in GPSMODS type *FILE not found.
Object XSROLOTV1 in QTEMP type *QMQRY deleted.
IMPORT source record length exceeds 79 characters.
Warnings issued on IMPORT QUERY command.
IMPORT operation completed successfully.
Warning returned by query management.
Keyword FROM not expected. Valid tokens: ) ,.
RUN QUERY command failed with SQLCODE -199.
RUN QUERY command ended due to error.
STRQMQRY command failed.
Function check. QWM2701 unmonitored by RUNGPSSQL at statement 13200,

SQL -

(INT(YEAR(DATE((DAYS(DATE(SUBSTR(CHAR(INT(LTDDAT/10000)) FROM 1 TO 4) || '-' || SUBSTR(CHAR(DEC((INT(LTDDAT/100) - INT(LTDDAT/10000)*100))/100) FROM 2 FOR 2) || '-' || SUBSTR(CHAR(DEC(LTDDAT - INT(LTDDAT/100)*100)/100) FROM 2 FOR 2) ))) - (DAYOFWEEK(DATE(SUBSTR(CHAR(INT(LTDDAT/10000)) FROM 1 FOR 4) || '-' || SUBSTR(CHAR(DEC((INT(LTDDAT/100) - INT(LTDDAT/10000)*100))/100)) FROM 2 FOR 2) || '-' || SUBSTR(CHAR(DEC(LTDDAT - INT(LTDDAT/100)*100)/100) FROM 2 FOR 2)))) + 1))) *100)

+

INT(WEEK(DATE((DAYS(DATE(SUBSTR(CHAR(INT(LTDDAT/10000)) FROM 1 FOR 4) || '-' || SUBSTR(CHAR(DEC((INT(LTDDAT/100) -INT(LTDDAT/10000)*100))/100) FROM 2 FOR 2 || '-' || SUBSTR(CHAR(DEC(LTDDAT - UBT(LTDDAT/100)*100)/100) FROM 2 FOR 2)))) (DAYOFWEEK(DATE(SUBSTR(CHAR(INT(LTDDAT/10000)) FROM 1 FOR 4) || '-' || SUBSTR(CHAR(DEC((INT(LTDDAT/100) - INT(LTDDAT/10000)*100))/100) FROM 2 FOR 2 || '-' || SUBSTR(CHAR(DEC(LTDDAT -INT(LTDDAT/100)*100)/100) FROM 2 FOR 2)))) + 1))) AS LTDDATYWYou can't pass the keyword FROM as a column alias within a SUBSTR function.

... SUBSTR(CHAR(DEC(LTDDAT-INT(LTDDAT/100)*100)/100) FROM 2 FOR 2)

Isn't the syntax supposed to be SUBSTR(string, start, length). The parenthesis after 2 FOR 2 ends the SUBSTR function.

Find the integer value, multiply by 100, subtract fro LTDDAT, convert to decimal, divide by 100, convert to character, then find a Substring within that resulting character string.

Maybe you only need to replace FROM with a comma, and replace FOR with a comma. the rest looks good.

Friday, February 24, 2012

HELP

I have been looking at several programs for an auction company . I used my f
irewall and virus check before trying any demo's . Some are OK some not suit
able. One uses and loaded SQL and ? on my computer and it has never been th
e same since. Any ideas ? T
he program adm has tried hard to help me out but at this point I would like
to uninstall it Can Not
because SQL and ? never fully installed . Would like to restore my sys (and
learn more about SQL) without going thru a XP sys restore.(it did not work f
or awhile after the program install and took 2 days to fix ) I love knowing
how my computer works(start
ed with 8088)But time to let experts help. Wish I could keep up with the cha
nge as fast it happens today.Last things first.
If you want to understand SQL better, a good free place to start is Books
On-Lon (BOL for short), included free or available for download here:
SQL Server 2000 Books Online (Updated - SP3)
http://www.microsoft.com/downloads/...71A6-BCF4-45A6-
A2E2-F6AB5BE3EF12&displaylang=en
Another good general resource on SQL server is Inside SQL 2000 by Kalen
Delaney, but you will have to pay for that. She has to earn a living
somehow.
Now for the really important part. Here is how to remove a broken SQL
install:. I hope you are comfortable with registry changes, because that is
the only way to deal with a broken install of any app. It is not simple,
but it is a better alternative than a total system rebuild.
HOW TO: Manually Remove SQL Server 2000 Default, Named, or Virtual Instance
http://support.microsoft.com/defaul...1&Product=sql2k
If you have more questions you know where to go.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
CareerBuilder.com
"need2know" <rsjones@.wapda.com> wrote in message
news:057E5FA0-BBEB-410A-A2DC-147B4E1C02F2@.microsoft.com...
quote:

> I have been looking at several programs for an auction company . I used my

firewall and virus check before trying any demo's . Some are OK some not
suitable. One uses and loaded SQL and ? on my computer and it has never
been the same since. Any ideas ? The program adm has tried hard to help me
out but at this point I would like to uninstall it Can Not
quote:

> because SQL and ? never fully installed . Would like to restore my sys

(and learn more about SQL) without going thru a XP sys restore.(it did not
work for awhile after the program install and took 2 days to fix ) I love
knowing how my computer works(started with 8088)But time to let experts
help. Wish I could keep up with the change as fast it happens today.
quote:

>

Sunday, February 19, 2012

Help

Dear Sir,
My name is Sureshkanan working as programmer cum network
administrator. I hav been using VB 6 & Ms Sql server 7
(now 2000) for
the programs. I have so many problem to be solved. If u
don't mind,
please help me in this regard.
Problem 1.
I hav a varchar field in sql server, which can hold 750
characters.
When I try to show the field in the crystal report 8.5,
the field is
truncated @. 255th character. It is showing first 254
character of the
content.
Problem 2
I installed a program which I developed onto several
machines using
administrator password. I checked the installed program,
that works
fine. In one computer the program is working when I logon
as
administrator but it is not working in other users. The
following
error is displayed when I clicked on the program.
The error.
The application failed to initialize property
(0xc0000022). Click on
ok to terminate the application.
All my clients are in Windows 2000 professional plat form.
Please advice me how can I over come above problemsSureshkanan wrote:
> Dear Sir,
> My name is Sureshkanan working as programmer cum network
> administrator. I hav been using VB 6 & Ms Sql server 7
> (now 2000) for
> the programs. I have so many problem to be solved. If u
> don't mind,
> please help me in this regard.
> Problem 1.
> I hav a varchar field in sql server, which can hold 750
> characters.
> When I try to show the field in the crystal report 8.5,
> the field is
> truncated @. 255th character. It is showing first 254
> character of the
> content.
This sounds like a Crystal issue. You may want ask Business Objects for
help on this.

> Problem 2
> I installed a program which I developed onto several
> machines using
> administrator password. I checked the installed program,
> that works
> fine. In one computer the program is working when I logon
> as
> administrator but it is not working in other users. The
> following
> error is displayed when I clicked on the program.
> The error.
> The application failed to initialize property
> (0xc0000022). Click on
> ok to terminate the application.
> All my clients are in Windows 2000 professional plat form.
> Please advice me how can I over come above problems
Sounds like a rights issue. Are you sure this is a SQL Server problem?
David Gugick
Imceda Software
www.imceda.com|||Problem 1 does sound like a crystal problem.
I have seen this scenario before in Access on form or report fields when the
control is bound to a memo type field and the data length is greater than
255. The solution was to remove any formatting on the control. Dont know
whether this applies to Crystal but you can try it
As David said i think you need to expand on exactly what you are doing.
Does your program actually connect to SQL server or does it not get that far
?
Andy
"Sureshkanan" wrote:

> Dear Sir,
> My name is Sureshkanan working as programmer cum network
> administrator. I hav been using VB 6 & Ms Sql server 7
> (now 2000) for
> the programs. I have so many problem to be solved. If u
> don't mind,
> please help me in this regard.
> Problem 1.
> I hav a varchar field in sql server, which can hold 750
> characters.
> When I try to show the field in the crystal report 8.5,
> the field is
> truncated @. 255th character. It is showing first 254
> character of the
> content.
> Problem 2
> I installed a program which I developed onto several
> machines using
> administrator password. I checked the installed program,
> that works
> fine. In one computer the program is working when I logon
> as
> administrator but it is not working in other users. The
> following
> error is displayed when I clicked on the program.
> The error.
> The application failed to initialize property
> (0xc0000022). Click on
> ok to terminate the application.
> All my clients are in Windows 2000 professional plat form.
> Please advice me how can I over come above problems
>|||In Version 10 of Crystal the problem of data length limitation in solved.
Try in Version 10 of Crystal Report
Hth
"Andy B" <AndyB@.discussions.microsoft.com> wrote in message
news:96926578-5B5A-487F-B73B-61D0FDB1FE11@.microsoft.com...
> Problem 1 does sound like a crystal problem.
> I have seen this scenario before in Access on form or report fields when
the
> control is bound to a memo type field and the data length is greater than
> 255. The solution was to remove any formatting on the control. Dont know
> whether this applies to Crystal but you can try it
> As David said i think you need to expand on exactly what you are doing.
> Does your program actually connect to SQL server or does it not get that
far?
> Andy
> "Sureshkanan" wrote:
>

HELP

I have been looking at several programs for an auction company . I used my firewall and virus check before trying any demo's . Some are OK some not suitable. One uses and loaded SQL and ? on my computer and it has never been the same since. Any ideas ? The program adm has tried hard to help me out but at this point I would like to uninstall it Can No
because SQL and ? never fully installed . Would like to restore my sys (and learn more about SQL) without going thru a XP sys restore.(it did not work for awhile after the program install and took 2 days to fix ) I love knowing how my computer works(started with 8088)But time to let experts help. Wish I could keep up with the change as fast it happens today.Last things first. :)
If you want to understand SQL better, a good free place to start is Books
On-Lon (BOL for short), included free or available for download here:
SQL Server 2000 Books Online (Updated - SP3)
http://www.microsoft.com/downloads/details.aspx?FamilyID=683D71A6-BCF4-45A6-
A2E2-F6AB5BE3EF12&displaylang=en
Another good general resource on SQL server is Inside SQL 2000 by Kalen
Delaney, but you will have to pay for that. She has to earn a living
somehow.
Now for the really important part. Here is how to remove a broken SQL
install:. I hope you are comfortable with registry changes, because that is
the only way to deal with a broken install of any app. It is not simple,
but it is a better alternative than a total system rebuild.
HOW TO: Manually Remove SQL Server 2000 Default, Named, or Virtual Instance
http://support.microsoft.com/default.aspx?scid=kb;en-us;290991&Product=sql2k
If you have more questions you know where to go.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
CareerBuilder.com
"need2know" <rsjones@.wapda.com> wrote in message
news:057E5FA0-BBEB-410A-A2DC-147B4E1C02F2@.microsoft.com...
> I have been looking at several programs for an auction company . I used my
firewall and virus check before trying any demo's . Some are OK some not
suitable. One uses and loaded SQL and ? on my computer and it has never
been the same since. Any ideas ? The program adm has tried hard to help me
out but at this point I would like to uninstall it Can Not
> because SQL and ? never fully installed . Would like to restore my sys
(and learn more about SQL) without going thru a XP sys restore.(it did not
work for awhile after the program install and took 2 days to fix ) I love
knowing how my computer works(started with 8088)But time to let experts
help. Wish I could keep up with the change as fast it happens today.
>