Error From System.Data.SqlServerCe.SqlCeCommand.ProcessResults() - ** No Exception Message Returned **

May 7, 2008

I have an app running Windows CE 5.0 and SqlServerCE 3.0. Occasionally, one of the production units will throw an exception with the following stack trace but no exception message:

Exception Msg:

Stack Trace: at System.Data.SqlServerCe.SqlCeCommand.ProcessResults()
at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand()
at System.Data.SqlServerCe.SqlCeCommand.ExecuteReader()
at System.Data.SqlServerCe.SqlCeCommand.ExecuteReader()
at XX.MobileApp.frmXXX.LoadData()


This is not something that I have been able to reproduce in our shop. I even take their database and run it here in our shop with out such errors. Does anyone know some possible causes for this error?


Sorry, I don't have more info to give becuase this is all I have to work with since I cannot reproduce in our shop. If the exception object exposes a property for the HResult, I would be able to provide that.

I appreciate your repsonses.

View 1 Replies


ADVERTISEMENT

Could Not Load Type 'System.Data.Sqlserverce.sqlcecommand' Error In A PDA Application

Dec 25, 2007



Hi,

I am developing a Application using SQLCE Database & VS 2005 for Intermec CN3 PDA
It is having Windows Mobile 5.0 OS and ARM920T PXA27x Processor.

I have already installed
Microsoft .NET CF 2.0,
Microsoft SQL Client 2.0 ( using %Program Files%Microsoft SQL Server Compact Editionv3.1SDKinwce500armv4isqlce30.wce5.armv4i.CAB file) in PDA

I could able to run the application in the development environment which is having
Windows XP OS.
Microsoft .NET Compact framework 2.0,
SQL Server 2005 Compact edition

But when I deploy the application in the PDA thro' cab file and try to run the application I am getting the below error at run time.

Could not load type
'System.Data.Sqlserverce.sqlcecommand' from assembly System.Data.Sqlserverce, version=9.0.242.0,culture=neutral,PublickeyToken=8984...'

I have added the SQLCE.dll from the below location

%Program Files%Microsoft SQL Server Compact Editionv3.1System.Data.SqlServerCe.dll

Anybody can suggest me to solve this issue.

Thanks in advance

With Regards,
D.Karthikeyan

View 3 Replies View Related

System.Data.SqlServerCe.SqlCeCommand Has A Bug Related To SqlCeParameter Order That Causes Exceptions.

Jan 11, 2008

I came across a frustrating bug last week. Basically, whenever I tried to execute almost any sql query with unnamed parameters (i.e. using "?" instead of "@param_name" in the SQL text), an exception would be thrown.

After trying lots and lots of things and navigating my way through the internals of System.Data.SqlServerCe.dll, I discovered that the method System.Data.SqlServerCe.SqlCeCommand.CreateParameterAccessor(...) has a bug.

The bug is that the private arrays "parameters" and "metadata" are ordered differently, yet at one point in CreateParameterAccessor(...) they are compared using the same index. Here are the two lines:
p = this.parameters[ i ];
and
MetaData info = metadata[ i ]
and then the column data types of "info" & "p" are incorrectly compared in a later method, ValidateDataConversion(...).

So take a step back... how are they ordered differently? From observation, I concluded the following:
The "parameters" array is ordered exactly in the order that the DbParameter's were added to the DbCommand object.
The "metadata" array is ordered according to the column order of the table in the database.


So what causes the exception? Well, CreateParameterAccessor(...) passes data types from two different columns (one type taken from parameters[ i ] and the other from metadata[ i ]) on to SqlCeType.ValidateDataConversion(...). And, of course, if they differ (e.g. one column is of type DateTime and the other is a SmallInt), an exception is thrown.
I've found two workarounds, and both seem to work well.
The first is to name the SqlCeParameters (e.g. "SELECT ... WHERE id=@id"). This causes the buggy branch of code to be completely bypassed.

The second is to add the SqlCeParameters in the exact same order as the columns exist in the table you are accessing. Note, I do *not* mean the order that you select the columns (e.g. "SELECT column1, column2, ..."). I mean the actual order of the columns in the database.

I've included my setup and a stack trace below to help if it can.

My setup is:
.Net CF 3.5
SqlServer CE 3.5
Visual Studio 2008
Deployed to Pocket PC 2003

Here is the stack trace (note the variables passed to ValidateDataConversion):

System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeType.ValidateDataConversion(System.Data.SqlDbType expectedType = DateTime, System.Data.SqlDbType actualType = SmallInt) + 0x4a bytes
System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeCommand.CreateParameterAccessor(System.Data.SqlServerCe.MetaData[] metadata = {System.Data.SqlServerCe.MetaData[34]}) + 0x89 bytes
System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeCommand.CreateDataBindings() + 0x5e bytes
System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan() + 0x16f bytes
System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(System.Data.CommandBehavior behavior = Default, string method = "ExecuteNonQuery", System.Data.SqlServerCe.ResultSetOptions options = None) + 0xa7 bytes
System.Data.SqlServerCe.dll!System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() + 0x7 bytes

View 1 Replies View Related

'((System.Exception)($exception)).Message' Threw An Exception Of Type 'System.NotSupportedException'

Jan 16, 2008

Greetings everyone, I am attempting to build my first application using Microsofts Sql databases. It is a Windows Mobile application so I am using Sql Server Compact 3.5 with Visual Studio 2008 Beta 2. When I try and insert a new row into one of my tables, the app throws the error message shown in the title of this topic.
'((System.Exception)($exception)).Message' threw an exception of type 'System.NotSupportedException'



My table has 4 columns (i have since changed my FavoriteAccount datatype from bit to Integer)
http://i85.photobucket.com/albums/k71/Scionwest/table.jpg

Account type will either be "Checking" or "Savings" when a new row is added, the user will select what they want from a combo box.

Next is a snap shot of my startup form.
http://i85.photobucket.com/albums/k71/Scionwest/form.jpg



Where it says "Favorite Account: None" in the top panel, I am using a link label. When a user clicks "None" it will go to a account creation wizard, and set the first account as it's primary/favorite. As more accounts are added the user can select which will be his/her primary/favorite. For now I am just creating a sample account when the label is clicked in an attempt to get something working. Below is the code used.


private void lnkFavoriteAccount_Click(object sender, EventArgs e)

{

FinancesDataSet.BankAccountRow account = this.financesDataSet.BankAccount.NewBankAccountRow();

account.Name = "MyBank Checking Account";

account.AccountType = "Checking";

account.Balance = Convert.ToDecimal("15.03");

account.FavoriteAccount = 1;//datatype is an integer, I have changed it since I took the screenshot.

financesDataSet.BankAccount.Rows.Add(account);
//The next three lines where added while I was trying to get this to work.
//I don't know if I really need them or not, I receive the error regardless if these are here or not.



this.bankAccountTableAdapter1.Update(financesDataSet);

this.financesDataSet.AcceptChanges();

refreshDatabase();

}


the refreshDatabase() code is here:


private void refreshDatabase()

{

this.bankAccountTableAdapter1.Fill(this.financesDataSet.BankAccount);

//Aquire a count of accounts the user has

int numAccounts = financesDataSet.BankAccount.Count;

//Loop through each account and see which one is the primary.

for (int num = 0; num != numAccounts; num++)

{
//Works ok in frmMain_Load, but when my lnkFavoriteAccount_click calls this, it throws the error.

if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)

{
//Display the primary account on our home page. User can click the link label & be taken to their account register.

this.lnkFavoriteAccount.Text = this.financesDataSet.BankAccount[num].Name.ToString();

this.lnkFavoriteFunds.Text = this.financesDataSet.BankAccount[num].Balance.ToString();

break;

}

}

}


and my form_load code

private void frmMain_Load(object sender, EventArgs e)

{

refreshDatabase();

}


So, when I click on the lnkFavoriteAccount label, and my new row gets added, the app stops at the following line in my DataSet.Designer

[global:ystem.Diagnostics.DebuggerNonUserCodeAttribute()]

public byte FavoriteAccount {

get {

try {

return ((byte)(this[this.tableBankAccount.FavoriteAccountColumn]));

}

catch (global:ystem.InvalidCastException e) {
//Stops at the following line, this error was caused by 'if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)'

throw new global:ystem.Data.StrongTypingException("The value for column 'FavoriteAccount' in table 'BankAccount' is DBNull.", e);

}

}

set {

this[this.tableBankAccount.FavoriteAccountColumn] = value;

}

}


I have no idea what I am doing wrong, all of the code I used I retreived from Microsofts help documentation included with VS2008. I have tried used my TableAdapter.Insert() method and it still failed when it got to

if (this.financesDataSet.BankAccount[num].FavoriteAccount == 1)

in my refreshDatabase() method it still failed.

When I look, the data has been added into the database, it's just when I try to retreive it now, it bails on me. Am I retreiving the information wrong?

Thanks for any help you guys can offer.

Johnathon

View 1 Replies View Related

Could Not Load Type 'System.Data.SqlServerCe.SqlCeDataAdapter' From Assembly 'System.Data.SqlServerCe'

May 10, 2006



Hi,

I am trying to make a mobile application work, but I get the following error. The operating system on Pocket PC is Microsoft® Windows Mobile„¢ 2003 Second Edition. Any ideas? Thanks in advance.

The followings are the error and my codes:

System.TypeLoadException was unhandled
Message="Could not load type 'System.Data.SqlServerCe.SqlCeDataAdapter' from assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91'."
StackTrace:
at SQLMobile.Form1.Form1_Load()
at System.Windows.Forms.Form.OnLoad()
at System.Windows.Forms.Form._SetVisibleNotify()
at System.Windows.Forms.Control.set_Visible()
at System.Windows.Forms.Application.Run()
at SQLMobile.Form1.Main()



Codes:

Private Sub FillGrid()

Dim filename As New String _

("Program FilesSQLMobilesqlmobile.sdf")

Dim conn As New SqlCeConnection("Data Source=" + filename)

Dim selectCmd As SqlCeCommand = conn.CreateCommand()

selectCmd.CommandText = "select Destination from flightdata"

Dim adp As New SqlCeDataAdapter(selectCmd)

Dim ds As New DataSet()

adp.Fill(ds)

DataGrid1.DataSource = ds

End sub

View 1 Replies View Related

System.Data.SqlServerCE.dll Reference Causes Error ...

Feb 15, 2007

Hello All ...

I
am attempting to create a program that will run on the PocketPC 2003
environment. I have upgraded Visual Studio to SP1, I have installed SQL
Server Compact Edition on my development machine and I have installed
SQL Server Compact Edition Tools For Visual Studio on the development
machine.

I have created a new project Visual Basic - Smart
Device - Pocket PC 2003. I have created a form for user input. I build
and deploy the form to the Symbol Pocket PC to test - no connection to
data and it works.

I then add a reference to
System.Data.SqlServerCE.dll and rebuild and redeploy the application to
the handheld. When I attempt to open the form I receive the following
error:

psmPocket.exe
NotSupportedException
System.Drawing.Bitmap

at
System.Resources.ResourceReader.LoadObjectV2() at
System.Resources.ResourceReader.LoadObject() at
System.Resources.RuntimeResourceSet.GetObject() at
System.Resources.ResourceManager.GetObject() at
System.Resources.ResourceManager.GetObject() at
pmsPocket.frmSetSOPType.InitializeComponent() at
psmPocket.frmSetSOPType..ctor() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.ContrcutorInfo.Invoke() at
System.Activator.CreateInstance() at MyForms.Create__Instance__() at
MyForms.get_frmSetSOPType() at psmPocket.SetSOPType.Main()

Now
the confusing part is that I haven't changed any of the forms or the
code behind the forms, I have simply added the reference to the project.

Any idea why adding the reference to System.Data.SqlServerCE.dll would cause the system to start generating these errors?

I've
checked, the install process has loaded the .NET 2 framework to the
handheld. And as indicated at the beginning of this message, the
application showed the form prior to my adding the reference.

Thoughts?

Thanks ...

View 3 Replies View Related

System.Data.SQLServerCE.dll Reference Generates Error

Feb 14, 2007

Hello All ...I
am attempting to create a program that will run on the PocketPC 2003
environment. I have upgraded Visual Studio to SP1, I have installed SQL
Server Compact Edition on my development machine and I have installed
SQL Server Compact Edition Tools For Visual Studio on the development
machine.I have created a new project Visual Basic - Smart
Device - Pocket PC 2003. I have created a form for user input. I build
and deploy the form to the Symbol Pocket PC to test - no connection to
data and it works.I then add a reference to
System.Data.SqlServerCE.dll and rebuild and redeploy the application to
the handheld. When I attempt to open the form I receive the following
error:psmPocket.exeNotSupportedExceptionSystem.Drawing.Bitmapat
System.Resources.ResourceReader.LoadObjectV2() at
System.Resources.ResourceReader.LoadObject() at
System.Resources.RuntimeResourceSet.GetObject() at
System.Resources.ResourceManager.GetObject() at
System.Resources.ResourceManager.GetObject() at
pmsPocket.frmSetSOPType.InitializeComponent() at
psmPocket.frmSetSOPType..ctor() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.RuntimeContructorInfo.InternalInvoke() at
System.Reflection.ContrcutorInfo.Invoke() at
System.Activator.CreateInstance() at MyForms.Create__Instance__() at
MyForms.get_frmSetSOPType() at psmPocket.SetSOPType.Main()Now
the confusing part is that I haven't changed any of the forms or the
code behind the forms, I have simply added the reference to the project.Any idea why adding the reference to System.Data.SqlServerCE.dll would cause the system to start generating these errors?I've
checked, the install process has loaded the .NET 2 framework to the
handheld. And as indicated at the beginning of this message, the
application showed the form prior to my adding the reference.Thoughts?Thanks ...

View 1 Replies View Related

Install Error System.data.sqlserverce Not In Global Assembly Cache

Nov 2, 2006

I have built a small application in vs2005 (vb) using system.data.slqserverce building

in the mobile sql engine into my app. I intend to run this on desktop. The app

works fine on my development laptop machine, when i publish it (to a hard disk folder) and run it on another laptop, i get:

'unable to install or run the application. The application requires that assembly system.data.sqlserverce version 9.0.242.0 be installed in the Global Assembly Cache (GAC) first.'

This is my first app in .net so not sure what this means.

I thought all i had to do was reference the file (which i have done in the project) and

VS would take care of stuff like this? Framework 2.0 is installed on the target machine.

Hope im in the right forum for this! if not i apologise



Any help most appreciated.



Chris Anderson









View 1 Replies View Related

System.Data.SqlServerCe

Aug 8, 2007

Sorry being a little vague but if you can point me in the right direction.
I have just created a new VB €“ Windows Mobile 5.0 pocket PC €“ Device Application. (which will be connected to a PDA)

Do i have to use System.Data.SqlServerCe or System.Data.SqlClient to connect to my db.

View 1 Replies View Related

Problem With System.Data.SqlServerCe.dll

Oct 11, 2006

I believe I've encountered a compatability problems with Visual Studion CF 2, specifically with the System.Data.SQLServerCE reference when trying to run (in debug mode - Pocket PC 2003 emulation). The environment is configured as follows:

Visual Studio 2005 - Compact Framework 2.0.50727

Microsoft SQL Server 2005 Mobile Edition

The (VB) project includes the following references:

System.Data.dll V2.0.000 from Program FilesMicrosoft Visual Studio 8Smart DevicesSDKCompact Framework2.0V2.0WindowsCE

System.Data.SqlServerCE.dll V3.0.5214.0 from Program FilesMicrosoft SQL Server Mobile EditionDeviceMobileV3.0

The IDE does not sense any problems with the following code until I try to run it in debug mode using the Pocket PC 2003 emulator. The code :

Imports System

Imports System.IO

Imports System.text

Imports System.Data

Imports System.Data.SqlServerCe

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

MsgBox("Will Test SQL")

Call testSQL()

End Sub

Private Sub testSQL()

Dim strConn As String = "Data Source = Test.sdf; Password = <password>"

Dim CEEngine As New SqlCeEngine(strConn)

CEEngine.CreateDatabase()

CEEngine.Dispose()

Dim Conn As SqlCeConnection = Nothing

Conn = New SqlCeConnection(strConn)

Conn.Open()

Dim cmd As SqlCeCommand = Conn.CreateCommand

cmd.CommandText = "CREATE TABLE MyTable (col1 int, col2 ntext)"

cmd.ExecuteNonQuery()

Conn.Close()

Exit Sub

ErrHandler:

MsgBox(Err.Number.ToString)

MsgBox(Err.Description.ToString)

End Sub

In the debugger, the program terminates at Dim CEEngine As New SqlCeEngine(strConn). The message displayed is

Can't find PInvode DLL 'sqlceme30.dll'

I've tried referencing a different version of System.Data.SqlServerCE.dll (from Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDE but the program will not even deploy to the emulator with this reference.

I encounter a Deployment/and or registration failed wit error : 0x8973190e - There is not enough space on the disk.

What versions of the following should be used?

System.dll

System.data.dll

System.data.sqlserverce.dll











View 5 Replies View Related

System.Data.SqlServerCe Versions

Oct 2, 2007



Hello,

I've inherited a .NET CF 2.0 application at work that uses SQL CE, and as I'm digging into the build process, I'm getting confused about which version of SQL CE that is being used.

The project references System.Data.SqlServerCe (no hint path, just from wherever VS 2005 has it). When I look at the assembly in my project, the version shows up as 3.0.3600.0, but when I browse to the DLL's location on my hard drive (C:Program Files (x86)Microsoft Visual Studio 8SmartDevicesSDK\SQL ServerMobilev3.0System.Data.SqlServerCe.dll), right click the DLL and check the properties, the version shows up as 3.0.3600.0.

In our installation package, we install three SQL CE Cabs:
sqlce30.dev.ENU.ppc.wce5.armv4i.CAB
sqlce30.ppc.wce5.armv4i.CAB
sqlce30.repl.ppc.wce5.armv4i.CAB

When installed on the device, the Remove Programs dialog shows as "Microsoft SQL Mobile 2005..." is installed. We keep the cabs in a seperate location so they are not just pulled from anywhere on the hard drive.

However, when I install the same CAB files located at:
C:Program Files (x86)Microsoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0wce500armv4i, the device shows "Microsoft SQL Mobile 2005 Compa...." is installed.

In my Add References dialog, System.Data.SqlServerCe has version 3.0.3600.0, runtime v2.0.50727

Some questions:
1. Is the version 3.0.3600.0 the same between 3.0 and 3.1?
2. Given a System.Data.SqlServerCe DLL, how can I tell if it is the 3.0 or 3.1 version?
3. When upgrading my project to use 3.1, is it enough simply to upgrade my build environment? Or should I need to change the references in my project? (It appears that the 3.1 DLLs have been placed into the default locations where VS 2005 is pulling them from). I'm using VS 2005 SP1 on Vista x64.


Thanks


View 4 Replies View Related

A First Chance Exception Of Type 'System.Data.SqlClient.SqlException' Occurred In System.data.dll

Jan 18, 2008

Hi,
I've written this code multiple times now. But for the first time i get an error at the line underlined. My procedure runs perfectly when i execute it through Sql Query analyzer.
plzz help.. Its urgent and am unable to find the reason for this error "A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll"
Thanks !SqlConnection conn = new SqlConnection(DbConnectionString);
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandText = "dbo.rqryTradesPRR";
cmd.Parameters.Add("@COBDate",SqlDbType.DateTime).Value = "2002-10-31 00:00:00.000" ;
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
// have written something here

}
 Thanks in advance !
 

View 2 Replies View Related

How To Use Db Provider Factories With System.Data.SqlServerCe

Jul 7, 2007

I'm using SQL Server Compact Edition, but in the future I would like to be able to switch to another SQL Server Edition or even a different database. To achieve this, Microsoft recommends using DB Provider Factories (see: Writing Provider Independent Code in ADO.NET, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=674426&SiteID=1).I enumerated the available data providers on my PC with:



Code Snippet

System.Reflection.Assembly[] myAssemblies = System.Threading.Thread.GetDomain().GetAssemblies();

The important entry is:"SQL Server CE Data Provider"".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition""Microsoft.SqlServerCe.Client""Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"When executing:




Code SnippetdataFactory = DbProviderFactories.GetFactory("System.Data.SqlServerCe");


I got at first this error run time message: Failed to find or load the registered .Net Framework Data Provider.I added a reference to "Microsoft.SqlServerCe.Client" at C:ProgrammeMicrosoft Visual Studio 8Common7IDEMicrosoft.SqlServerCe.Client.dll and the program runs.Of course, it uses "Microsoft.SqlServerCe.Client" instead of "System.Data.SqlServerCe". Laxmi Narsimha Rao ORUGANTI from Microsoft writes in the post "SSev and Enterprise Library" that "Microsoft.SqlServerCe.Client" is not meant to be used and that we should add the following entry to the machine.config file:




Code Snippet<add name="SQL Server Everywhere Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />


After changing the code to:


Code Snippet

dataFactory = DbProviderFactories.GetFactory("Microsoft.SqlServerCe.Client");

I get the same error message as before, even after adding a reference to "System.Data.SqlServerCe" at C:ProgrammeMicrosoft Visual Studio 8Common7IDESystem.Data.SqlServerCe.dll.Any suggestion what I should do ? Just use "Microsoft.SqlServerCe.Client" ? Anyway, I don€™t like the idea that I have to change the machine.config file, since I want to use click once deployment.

View 5 Replies View Related

System.data.sqlserverce.dll Problem -- Its Very Urgent

Dec 18, 2006

hi,

 We are facing a problem with compact framework 1.0 and SQL CE on windows mobile 5.0 smart phone (Motorola Q).

The application was build for Windows Mobile 5.0. When we use €œSystem.Data.SQLServerCE.dll€? from €œC:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0€? in compact framework 2.0 it works fine.

Since Motorola Q has .Net Compact Framework 1.0 we need to port same application to compact framework 1.0. There is similar DLL in "C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev2.0" but it is not working, it gives runtime error missing method at very first line of code SqlCeEngine _eng = new SqlCeEngine().

 

Thanks & regards,

Rashmi

 
 

View 3 Replies View Related

SELECT @@IDENTITY Using System.Data.SqlServerCe?

Mar 29, 2007

Hi! I am having a problem getting the inserted id from a table.

Here is the table:

/*********************** Companies **********************************/
CREATE TABLE Companies(
CompanyId int IDENTITY(1,1) PRIMARY KEY,
Description nvarchar(30) NOT NULL
)
GO

When I type SELECT @@IDENTITY in SQL Management Studio after a successful insert, it works fine. However, in code (System.Data.SqlServerCe), I get an error using this code:


SqlCeCommand cmd = conn.CreateCommand();

cmd.CommandText = sql;

cmd.CommandType = System.Data.CommandType.Text;

ret = (int)cmd.ExecuteScalar();

I saw a thread with this solution, but do I really have to go to this trouble?

DECLARE @MyTable table
( MyIdentity int )
INSERT INTO Employees ( FirstName, LastName )
OUTPUT inserted.EmployeeID INTO @MyTable
VALUES ( 'Bill', 'Smith' )
SELECT MyIdentity
FROM @MyTable



scope_identity does not seem to work either. Am I missing something?



Thanks!

Michael

View 11 Replies View Related

Problem With Referencing System.Data.SqlServerCE.dll

May 31, 2007

Hello



I have referrenced System.Data.SqlServerCE.dll to my web project in order to create a .sdf file. I haven't wrote any code,just referenced it. When I build the project I get this error:



Error 2 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' cannot be loaded.

View 2 Replies View Related

Why System.Data.SqlserverCe.Dll Doesn't Appear In VS2005

Apr 25, 2006

Hi all,

Why System.Data.SqlserverCe.Dll doesn't appear in VS2005. In VS2003 System.Data.SqlserverCe.Dll appear to write winCE application. But it won't appear in VS2005 while am selecting PocketPc application. any body gimme the solution.

Thanks

Nat Raja

View 7 Replies View Related

Could Not Load File Or Assembly 'System.Data.SqlServerCe'...

Nov 30, 2005

I am trying to use SQL Mobile 2005 with Visual Studio 2005.  I have a simple sql mobile db i created and am trying to test connectivity to the DB in a simple app.  I added the reference to the SqlServerCE and the verison # that is shown in properties is 3.0.3600.0, but when i look at the physical DLL in explorer (found at C:Program FilesMicrosoft Visual Studio 8SmartDevicesSDKSQL ServerMobilev3.0) the version # is 3.0.5206.0, so when i compile and run the test, I get :

View 7 Replies View Related

System.Data.SqlServerCe Desktop Vs Compact Framework

Aug 7, 2007

How can I tell if the System.Data.SqlServerCe assembly I am referencing is meant for Desktop use as opposed to Compact development? We are using NUnit as our testing framework and I get the following error when I attempt to execute nunit-console on my test fixture referencing SqlServerCe:

System.IO.FileLoadException : Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ---->

System.IO.FileLoadException : Could not load file or assembly 'System.Data.SqlServerCe, Version=3.0.3600.0, Culture=neutral, PublicKeyToken=3be235df1c8d2ad3, Retargetable=Yes' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


The unit tests run fine from inside of Visual Studio using the Resharper Unit Test Runner...

Matt

View 1 Replies View Related

How To Find Correct System.Data.SqlServerCe.dll In Desktop Project?

Feb 2, 2008

Hi,
I am working on a .dll which need to access .sdf ( sql server mobile db). In my project, I added a reference "System.Data.SqlServerCe.dll". The dll is located in C:Program FilesMicrosoft Visual Studio 8Common7IDE.
I am able to compile the project. Then I created a Unit project for this dll file. In Unit project, I added the same reference.
Now the magic things happen. The compiling was failed. I got "Error 1 The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:VS2005MobileDBUnitMobileDBProjectUnitMobileDB.cs 50 13 UnitMobileDBProject".

I don't understand how come the same .dll could pass in a dll project but failed in unit test project. And I never saw the System.Data.SqlServerCe display in ".Net" Section of Add reference. But in my office, I installed same version of VS2005 for software tester. I could see the System.Data.SqlServerCe display in the ".Net" section of Add Reference.

Please help me to fix this problem. Thanks.

View 6 Replies View Related

Reference To Data.System.SqlServerCe In VS2005 Does Not Install CE 2.0 To Emulator/PDA

Feb 3, 2006

We have a Compact Framework 1.1 application that uses Sql Server CE 2.0. In VS2003, a reference to System.Data.SqlServerCe causes the Sql Server CE dlls and Query Analyzer to install to the Emulator or PDA.

I am currently converting the application to Compact Framework 2.0, but we are not upgrading to Sql Server Mobile (yet). However, the reference to System.Data.SqlServerCe, in VS 2005, no longer causes Sql Server CE to install to the PDA/Emulator.

There is a difference in the build outputs between VS2003 & VS2005. In 2003, System_SR_enu.cab, sqlce.wce4.x86.cab & sqlce.dev.wce4.x86.cab are copied & lanuched. In 2005, only System_SR_enu.cab is copied... no launch.

Any ideas? Reinstall VS2005?

View 3 Replies View Related

Could Not Load File Or Assembly 'System.Data.SqlServerCe, Version 3.5.0.0

May 8, 2008

We just upgraded our applications from VS 2005 to VS 2008 and discovered we had to convert our SQL Server CE databases. So I did that. I then included the sqlce...35.dlls in the application directory on my test computer as well as the System.Data.SqlServerCe.dll version 3.5.

sqlceca35.dll
sqlcecompact35.dll
sqlceer35EN.dll
sqlceme35.dll
sqlceoledb35.dll
sqlceqp35.dll
sqlcese35.dll

When I run the app and it tries to load the System.Data.SqlServerCe.dll I get the following error:
System.IO.FileLoadException: Could not load file or assembly 'System.Data.SqlServerCe, Version 3.5.0.0...or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

We have the application targeting the .NET Framework 2.0 and need to keep it that way for awhile.

Any ideas on how to resolve the error?

View 5 Replies View Related

Referencing To System.Data.SqlServerCe Causes Large Files To Deploy To Emulator

Dec 8, 2006

Hello everyone,

This is my first time posting here, I hope this questions has not been asked before. I tried to search for it but I came not with nothing.

Recreating the error :

I am using VS2005. I created a Pocket PC 2003 project.
I have downloaded the SQL Server Compact Edition and installed it. I get the System.Data.SqlServerCe.dll file from the installation directory.
I reference to that DLL using Add Reference in VS2005.

Build it. In the Bin folder, a long list of files suddenly appears.

System.data.dll
System.data.oracleClient.dll
system.web.dll
system.enterpriseservices.dll
system.enterpriseservices.wrapper.dll
system.transactions.dll
and the rest of your original files in Bin

The worst of it all, all of these files are deployed into the Emulator! Causing it to run out of memory and unable to deploy.



Something is not right here, I just cannot figure it out! If this happens, each mobile devices can hold one applications. Thats not the way it should be, right?

If you have solved this before, do help. I am at my wits end at the moment.

Thanking you in advance.

Sincerely,
Lasker

View 1 Replies View Related

Displaying Error Message - No Rows Returned

Dec 4, 2006

Hello,

I have a seach on UserID enetred in a textbox by user.

When the user types a userID which has no data in the database can I display an error msg instead of the chart and table that is displayed on entering a valid userID.



Thanks,

Kiran.

View 3 Replies View Related

Error Message Returned When Executing Package Via C# App On Citrix

Oct 2, 2006

Hi,

I'm at a loss as to why i am getting the following error:

Retrieving the COM class factory for component CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E}failed due to the following error: 80040154

I am calling the package from a C# application which i have installed within a citrix environment. The application works without any trouble on my development machine but as soon as i run the code that executes the SSIS pacakge i get the error. Can anyone enlighten me as to what is causing this?

Many thanks in advance,

Grant

View 4 Replies View Related

The Script Threw An Exception: Exception Of Type 'System.OutOfMemoryException' Was Thrown.

Jan 31, 2007

Hi,

I got an strange problem with one of my packages.

When running the package in VisualStudio it runs properly, but if I let this package run as part of an SQL-Server Agent job, I got the message "The script threw an exception: Exception of type 'System.OutOfMemoryException' was thrown." on my log and the package ends up with an error.

Both times it is exactly the same package on the same server, so I don't know how the debug or even if there is anything I need to debug?

Regards,

Jan

View 2 Replies View Related

[File System Task] Error: An Error Occurred With The Following Error Message: Access To The Path Is Denied

Sep 7, 2007

Hi -

I have an File System Task that copies a file from one directory ot another. When I hard code the target directory (c:dirfile.txt) it works fine. When I change it to a virtual directory (\serverdirfile.txt) I get a security error:

[File System Task] Error: An error occurred with the following error message: "Access to the path '\gracehbtest oS2TMM_Live_Title_000002.xml' is denied.".

Where do I change the security settings?

Thanks - Grace

View 5 Replies View Related

SQL Server Error Message - Operating System Error 10038: An Operation Was Attempted On Something That Is Not A Socket...

Nov 20, 2006

My apologies...I wasn't for sure where to post an error like this...

Over the last 2 months I have gotten this SQL Server error (twice). All existing processes will continue to work, however no new processes can be created and users cannot connect to the server. This is the exact text of the message in the SQL Server error log.

Operating system error 10038: An operation was attempted on something that is not a socket...

Error: 17059, Severity: 18, State: 0

Error accepting connection request via Net-Library 'SSNETLIB'. Execution continuing.

Error: 17882, Severity: 18, State:

While we can typically just stop SQL Server Service and restart the services...I have found it is best to restart the machine during non-production times to take care of any 'residual' effects of this error.

The SQL Server 2000 SP4 box with Windows 2003 Standard SP1 is well maintained by our I.T. team and it typically will run 4 or 5 months without a reboot.



Thank you...

...cordell...

View 5 Replies View Related

System.Data.SqlClient.SqlError: Cannot Open Backup Device '\.Tape0'. Operating System Error 5(error Not Found). (Microsoft.Sql

Nov 25, 2007

System.Data.SqlClient.SqlError: Cannot open backup device '\.Tape0'. Operating system error 5(error not found). (Microsoft.SqlServer.express.Smo)

i have only one sql instance and tape is istalled successfully.
please help me to find solution for this error.

Thanks,

View 2 Replies View Related

Exception Details: System.Data.SqlClient.SqlException: Procedure 'spInsertBillingQ' Expects Parameter '@bankname', Which Was Not Supplied.

Mar 1, 2007

Hello Coders,
 I need help fixing a problem in my code that I do not understand. I basically have a procedure that is supposed to take all user information and then insert it to the DB or update the Database based on user entry.
The call to the method is this
Dim bankname As String = ""
If (objBill.BillTransaction(Session("conString"), Session("whattobill"), PROC_CURR, Session("lISN"), 0, Session("fISN"), Request.ServerVariables("REMOTE_ADDR"), "scott@mycleanstart.com", Session("fAmount"), Session("first_name"), Session("last_name"), Session("city"), Session("state"), Session("phone"), Session("address1"), Session("address2"), Session("postal_code"), Session("email_address"), Session("fDesc"), Session("ssn"), Session("nameoncard"), Session("PAN"), Session("cvv"), Session("cardexpirationdate"), bankname, Session("txtroutingnumber"), Session("txtaccountnumber"), Session("txtchecknumber"), Session("bqISN"), _
returnedbqISN, AuthCode, OrderNumber, DeclineCode, TermCode, ErrorMessage, authenticationValue, authenticationTransactionID, str_Centinal_ECI, "signup", PAResStatus, SignatureVerification, paypalSubAgreeID, notificationLocation, strErrorNo, strErrorDesc, strTransactionID, strStatus, strStatusCode, strReasonCode)) Then
 
 And then below is the actual method itself........
NOTE: The code below is contained in a DLL
 
 
 
 
 1 public bool BillTransaction(string strDBInstance, string ccORach, string whichProcessor,Int32 lISN, Int32 mISN,
2 Int32 fISN, string ip,string merchant_email,string total_amount,
3 string firstname, string lastname, string city,string state, string phone, string address1,string address2, string zip, string customer_email,
4 string product_desc, string socialsecuritynum, string nameoncard, string creditcardnumber, Int32 cardverifynum, DateTime cardexpiredate,
5 string bankname, string routingnumber, string accountnumber, string checknumber, Int32 bqISN,
6 ref Int32 returnedbqISN, ref string AuthCode, ref string OrderNumber, ref string DeclineCode,
7 ref string TermCode, ref string ErrorMessage,
8 string authenticationValue,string authenticationTransactionID,string eci,string transactiontype,
9 string PAResStatus, string SignatureVerification, string paypalSubAgreeID, string notificationLocation,
10 ref string strErrorNo, ref string strErrorDesc, ref string strTransactionId, ref string strStatus,
11 ref string strStatusCode, ref string strReasonCode)
12
13 {
14
15 if (ccORach.Trim().Length <= 0)
16 {
17 ErrorMessage = "CC or Check?";
18 return false;
19 }
20
21 if (whichProcessor.Trim().Length <= 0)
22 {
23 ErrorMessage = "Blank processor";
24 return false;
25 }
26
27 decimal grand_total = Convert.ToDecimal(decimal.Parse(total_amount).ToString("N2"));
28 string ProcessorResponse="";
29 Database db = DatabaseFactory.CreateDatabase(strDBInstance);
30 DBCommandWrapper dbCmdWrapper = null;
31 bool retBilling = true;
32 string sql = "";
33 string bqAction = "SBILL";
34 string strFirstName = "";
35 string strLastName = "";
36 string[] cardname = nameoncard.Split(new char[] {' '});
37 strFirstName = cardname[0];
38 for (int i=1; i <= cardname.GetUpperBound(0); i++)
39 {
40 strLastName = strLastName + ' ' + cardname[i].Trim();
41 }
42
43 MCS_Encryption.Encryption mcscrypt = new MCS_Encryption.Encryption();
44 //card number
45 string enc_cardnumber = mcscrypt.Encrypt(creditcardnumber);
46 //account number
47 string enc_accountnumber = mcscrypt.Encrypt(accountnumber);
48
49 if (bqISN > 0)
50 {
51 //if bqISN is present, do UPDATE instead
52 sql = "spUpdateBillingQ";
53 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
54 dbCmdWrapper.AddInParameter("@bqISN",DbType.Int32,bqISN);
55 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
56 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
57 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
58 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
59 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
60 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
61 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
62 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
63 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
64 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
65 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
66 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
67 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
68 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
69 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
70 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
71 dbCmdWrapper.AddInParameter("@fISN",DbType.Int32, fISN);
72 dbCmdWrapper.AddInParameter("@price",DbType.Currency, grand_total);
73 dbCmdWrapper.AddInParameter("@description",DbType.String, product_desc);
74 dbCmdWrapper.AddInParameter("@bqaction",DbType.String, bqAction);
75 dbCmdWrapper.AddInParameter("@creditamount",DbType.Currency, 0);
76 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
77 db.ExecuteNonQuery(dbCmdWrapper) ;
78
79 returnedbqISN = bqISN;
80 }
81 else
82 {
83 //insert into billingQ or update if bqISN is passed
84 sql = "spInsertBillingQ";
85 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
86 dbCmdWrapper.AddInParameter("@lISN",DbType.Int32,lISN);
87 dbCmdWrapper.AddInParameter("@mISN",DbType.Int32,mISN);
88 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
89 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
90 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
91 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
92 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
93 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
94 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
95 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
96 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
97 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
98 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
99 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
100 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
101 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
102 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
103 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
104 dbCmdWrapper.AddInParameter("@fISN",DbType.Int32, fISN);
105 dbCmdWrapper.AddInParameter("@price",DbType.Currency, grand_total);
106 dbCmdWrapper.AddInParameter("@description",DbType.String, product_desc);
107 dbCmdWrapper.AddInParameter("@bqaction",DbType.String, bqAction);
108 dbCmdWrapper.AddInParameter("@creditamount",DbType.Currency, 0);
109 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
110 returnedbqISN = 0;
111 returnedbqISN = (Int32)db.ExecuteScalar(dbCmdWrapper) ;
112
113 }
114
115
116
117 //bill credit card or ACH
118 switch (ccORach.Trim())
119 {
120 case "CC":
121 retBilling = BillCreditCard(whichProcessor,ip,merchant_email,grand_total, strFirstName.Trim(), strLastName.Trim(),
122 city,state, phone, address1,address2, zip, customer_email,
123 product_desc, socialsecuritynum,creditcardnumber, cardverifynum, cardexpiredate,returnedbqISN,
124 ref AuthCode, ref OrderNumber, ref DeclineCode, ref TermCode, ref ErrorMessage, ref ProcessorResponse,
125 authenticationValue,authenticationTransactionID, eci, transactiontype, PAResStatus, SignatureVerification);
126 break;
127 case "ACH":
128 retBilling = BillACH(whichProcessor, ip,merchant_email, grand_total, firstname, lastname,
129 city,state, phone, address1,address2, zip, customer_email,
130 product_desc, socialsecuritynum,bankname, routingnumber, accountnumber, checknumber, returnedbqISN,
131 ref AuthCode, ref OrderNumber, ref DeclineCode, ref TermCode, ref ErrorMessage, ref ProcessorResponse);
132 break;
133 case "PAYPAL":
134 retBilling = BillPayPal(ip,merchant_email,grand_total,firstname,lastname,
135 city,state,phone,address1,address2,zip,customer_email,
136 product_desc,socialsecuritynum,returnedbqISN, paypalSubAgreeID, notificationLocation,
137 ref strErrorNo, ref strErrorDesc, ref strTransactionId, ref strStatus,
138 ref strStatusCode, ref strReasonCode);
139 break;
140 }
141
142 //insert into billingDetail
143 char bqRecurring = 'N';
144 sql = "spInsertBillingDetail2";
145 dbCmdWrapper = db.GetStoredProcCommandWrapper(sql);
146
147 dbCmdWrapper.AddInParameter("@mISN",DbType.Int32,mISN);
148 dbCmdWrapper.AddInParameter("@bqISN",DbType.Int32,returnedbqISN);
149 dbCmdWrapper.AddInParameter("@bdamountcollected",DbType.Currency,grand_total);
150 dbCmdWrapper.AddInParameter("@bdtransactioncode",DbType.String,AuthCode);
151 dbCmdWrapper.AddInParameter("@bdstatus",DbType.Boolean,retBilling);
152 dbCmdWrapper.AddInParameter("@bdauthcode",DbType.String,AuthCode);
153 dbCmdWrapper.AddInParameter("@bdordernumber",DbType.String,OrderNumber);
154 dbCmdWrapper.AddInParameter("@bdtracecode",DbType.String,returnedbqISN);
155 dbCmdWrapper.AddInParameter("@email",DbType.String,customer_email);
156 dbCmdWrapper.AddInParameter("@bankname",DbType.String,bankname);
157 dbCmdWrapper.AddInParameter("@routingnumber",DbType.String,routingnumber);
158 dbCmdWrapper.AddInParameter("@accountnumber",DbType.String,enc_accountnumber);
159 dbCmdWrapper.AddInParameter("@checknumber",DbType.String,checknumber);
160 dbCmdWrapper.AddInParameter("@nameoncard",DbType.String,nameoncard);
161 dbCmdWrapper.AddInParameter("@cardnumber",DbType.String,enc_cardnumber);
162 dbCmdWrapper.AddInParameter("@cardverifynum",DbType.Int32,cardverifynum);
163 dbCmdWrapper.AddInParameter("@cardexpirationdate",DbType.DateTime,cardexpiredate);
164 dbCmdWrapper.AddInParameter("@billaddress1",DbType.String,address1);
165 dbCmdWrapper.AddInParameter("@billaddress2",DbType.String,address2);
166 dbCmdWrapper.AddInParameter("@billcity",DbType.String,city);
167 dbCmdWrapper.AddInParameter("@billstate",DbType.String,state);
168 dbCmdWrapper.AddInParameter("@billzip",DbType.String,zip);
169 dbCmdWrapper.AddInParameter("@billphone",DbType.String, phone);
170 dbCmdWrapper.AddInParameter("@ip",DbType.String, ip);
171 dbCmdWrapper.AddInParameter("@bqrecurring",DbType.String, bqRecurring);
172 dbCmdWrapper.AddInParameter("@Message",DbType.String, ErrorMessage);
173 dbCmdWrapper.AddInParameter("@ProcessorResponse",DbType.String, ProcessorResponse);
174 dbCmdWrapper.AddInParameter("@processor",DbType.String, whichProcessor);
175
176 dbCmdWrapper.AddInParameter("@strErrorNo",DbType.String, strErrorNo);
177 dbCmdWrapper.AddInParameter("@strErrorDesc",DbType.String, strErrorDesc);
178 dbCmdWrapper.AddInParameter("@strTransactionId",DbType.String, strTransactionId);
179 dbCmdWrapper.AddInParameter("@strStatus",DbType.String, strStatus);
180 dbCmdWrapper.AddInParameter("@strStatusCode",DbType.String, strStatusCode);
181 dbCmdWrapper.AddInParameter("@strReasonCode",DbType.String, strReasonCode);
182
183
184 Int32 returnedbdISN = 0;
185 returnedbdISN = (Int32)db.ExecuteScalar(dbCmdWrapper) ;
186 if (retBilling)
187 {
188 if (UpdateBillingQStatuses(strDBInstance,returnedbqISN,'S'))
189 {
190 return true;
191 }
192 }
193 else
194 {
195 if (UpdateBillingQStatuses(strDBInstance,returnedbqISN,'F'))
196 {
197 return false;
198 }
199 }
200 return false;
201
202 }

 
 
 

View 2 Replies View Related

An Unhandled Exception Occurred During The System.Data.SqlClient.SqlException: Login Failed For User 'IT-CELLIWAM_IT-SERVER'.

Sep 30, 2004

While making a connection to a SQL server Enterprise Database using ASP.Net(C#), during execution of .aspx file i got the following error :-

Kindly help me if anybody knows the solution .

Thanks in advance


Login failed for user 'IT-CELLIWAM_IT-SERVER'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'IT-CELLIWAM_IT-SERVER'.

Source Error:


Line 52: //mycommand.SelectCommand.CommandType=CommandType.StoredProcedure;
Line 53: DataSet ds=new DataSet();
Line 54: mycommand.Fill(ds);
Line 55: DataTable dt;
Line 56: dt=new DataTable();


Source File: c:inetpubwwwrootetapplogin.aspx.cs Line: 54

Stack Trace:


[SqlException: Login failed for user 'IT-CELLIWAM_IT-SERVER'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +484
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
netapp.login.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootetapplogin.aspx.cs:54
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

View 2 Replies View Related

ODBC Error Message - HY001 System Resource Exceeded

Sep 5, 2007

I have a page that was working but now I am getting the following errors.
Server Error in '/' Application.


ERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failedERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Odbc.OdbcException: ERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failedERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended PropertiesERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDRERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMTERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.Source Error:



An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:



[OdbcException (0x80131937): ERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute Extended Properties
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute HDR
ERROR [01S00] [Microsoft][ODBC Text Driver]Invalid connection string attribute FMT
ERROR [HY001] [Microsoft][ODBC Text Driver] System resource exceeded.]
System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +35
System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) +131
System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +98
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +27
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +47
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.Odbc.OdbcConnection.Open() +37
DevSite_ImportStep1.btnUpload_Click(Object sender, EventArgs e) +219
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

I am uploading a text file to a MS SQL 2000 database using an ODBC driver.  Here is the code:
 <code>
FileUpload1.SaveAs(fpath + "" + fn)
litStep1.Visible = TrueDim FieldCount As Int16
Dim FileType As Int16Dim cmd As SqlCommand
Dim dr As SqlDataReaderDim conn2 As OdbcConnection
Dim dr2 As OdbcDataReader
Dim cmd2 As OdbcCommand
conn2 = New OdbcConnection("Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=" + fpath + ";Extended Properties='text;HDR=YES;FMT=Delimited'")
conn2.ConnectionTimeout = 200
cmd2 = New OdbcCommand("Select top 5 * from [" + fn + "] ", conn2)
cmd2.CommandType = CommandType.Text
cmd2.CommandTimeout = 300
conn2.Open()
dr2 = cmd2.ExecuteReader()
FieldCount = dr2.FieldCount
conn2.Close()
 
</code>
 Before when this happened a reboot of the sql server resolved the problem.  That's not working this time and it's certainly not a practical solution.
 Any suggestions?
 

View 2 Replies View Related

Error Message 25080 The Operating System Does Not Support Encryption Again

Nov 19, 2007

A customer of my program is getting the SQL CE error message "The operating system does not support encryption".


I've seen several threads on this issue, but none of them seem to apply to my problem. This is a Windows Forms application, so no device and no web service.

The OS is a German Windows XP - so there shouldn't be any issues regarding strong encryption. It even runs in Windows 2000 in our test VPC.

We're using SQL CE 2005.

Any ideas what I could check?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved