Error in SQLDataAdapter

  • Thread starter Thread starter David Stevens
  • Start date Start date
D

David Stevens

I have an application running on a symbol device running PocketPC.
This app work on a previous demo symbol device also running PocketPC,
but after we purchased a new device we get a MissingMethodException on
the following command: sql.SqlDataAdapter1.Fill(data)
If I run in the emulator everything runs fine. Any ideas? I have tried
a hard reset and re-applying the .net compact framework service pack.
Thanks.
 
David,

I'm a little concerned about the syntax you are using in your example below
regardless of the platform you're running on. Here is an example from my
own
DataBaseManager class that demonstrates the use of SqlDataAdapter. Try
using this method on your new Symbol device.

public DataTable GetDataTable(string sqlStr)
{

SqlCeDataAdapter sqlDa = new SqlCeDataAdapter(sqlStr, this.DBConnection);
DataTable dt = new DataTable();

try
{
sqlDa.Fill(dt);
}
catch (SqlCeException se)
{
_displaySQLCEErrors(se);
}
catch (Exception ex)
{
MessageBox.Show("Exception getting data table representing:\n\n " +
sqlStr.ToString() + "\n\n" + ex.ToString(), "Error");
}
return dt;
}

One last thought - I have worked with demo units from Symbol
that are pre-production devices some sales rep wanted me to put a demo on
that were very flaky at times, but you are getting a definite error message,
not
sporadic crashes, so that's probably not your issue.

-Darren Shaffer
 
Have you tried deploying the application by using Run command in Visual
Studio?
 
Also, I am getting the same error on the Open call of the following
block:

try
{
SqlDataAdapter sda = new SqlDataAdapter();

SqlConnection sc = new SqlConnection("data source=10.0.0.69;user
id=sa;password=;initial catalog=INSAsset;persist security
info=True;packet size=4096");
SqlCommand sqc = new SqlCommand();

sqc.CommandType = CommandType.Text;
sqc.CommandText = "Insert into AssetList
(ItemNumber,ItemDescription,ItemLocation,ItemOwner) values
('1','Test','Office 1', 'David Stevens')";
sc.Open();
sqc.Connection = sc;
sqc.ExecuteNonQuery();
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}

I am trying to connect to a Database via ActiveSync and/or a wireless
connection.
Thanks.
 
Make sure SQL Client is installed on the device.
There should be a separate entry in device's "Remove program" for SQL
Client.
If there's none, please install it.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
There is no listing in Remove Programs for SQl Client. Where can I get
this? Is this part of the SqlCE installation?

Thanks.
 
No, it's a separate CAB file. Look for SQL*.CAB for your specific CPU in
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\

For example, for PPC 03 it would be:

C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows
CE\wce400\armv4\sql.wce4.armv4.CAB

VS should deploy this CAB for you. Without VS, it's up to your application
installer to deploy it along with CF.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: (e-mail address removed) (David Stevens)
Newsgroups: microsoft.public.dotnet.framework.compactframework
Subject: Re: Error in SQLDataAdapter
Date: 3 Dec 2004 08:07:31 -0800
Organization: http://groups.google.com
Lines: 47
Message-ID: <[email protected]>
References: <[email protected]>
NNTP-Posting-Host: 68.17.117.36
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1102090052 16324 127.0.0.1 (3 Dec 2004 16:07:32 GMT)
X-Complaints-To: (e-mail address removed)
NNTP-Posting-Date: Fri, 3 Dec 2004 16:07:32 +0000 (UTC)
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!border1.nntp.dca.gi
ganews.com!nntp.giganews.com!news.glorb.com!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.compactframework:66295
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

There is no listing in Remove Programs for SQl Client. Where can I get
this? Is this part of the SqlCE installation?

Thanks.

(e-mail address removed) ("Ilya Tumanov [MS]") wrote in message
Make sure SQL Client is installed on the device.
There should be a separate entry in device's "Remove program" for SQL
Client.
If there's none, please install it.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

-------------------- 03:42:00
GMT)
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
 
Back
Top