Showing posts with label statement. Show all posts
Showing posts with label statement. Show all posts

Tuesday, March 27, 2012

@@Identity not returning Value

I have a stored procedure that inserts a record. I call the @.@.Identity variable and assign that to a variable in my SQL statement in my asp.net page.

That all worked fine when i did it just like that. Now I'm using a new stored procedure that inserts records into 3 tables successively, and the value of the @.@.Identity field is no longer being returned.

As you can see below, since I don't want the identity field value of the 2 latter records, I call for that value immediately after the first insert. I then use the value to populate the other 2 tables. I just can't figure out why the value is not being returned to my asp.net application. Think there's something wrong with the SP or no?

When I pass the value of the TicketID variable to a text field after the insert, it gives me "@.TicketID".

Anyone have any ideas?


CREATE PROCEDURE [iguser].[newticket]
(
@.Category nvarchar(80),
@.Description nvarchar(200),
@.Detail nvarchar(3000),
@.OS nvarchar(150),
@.Browser nvarchar(250),
@.Internet nvarchar(100),
@.Method nvarchar(50),
@.Contacttime nvarchar(50),
@.Knowledge int,
@.Importance int,
@.Sendcopy bit,
@.Updateme bit,
@.ClientID int,
@.ContactID int,
@.TicketID integer OUTPUT
)
AS

INSERT INTO Tickets
(
Opendate,
Category,
Description,
Detail,
OS,
Browser,
Internet,
Method,
Contacttime,
Knowledge,
Importance,
Sendcopy,
Updateme
)
VALUES
(
Getdate(),
@.Category,
@.Description,
@.Detail,
@.OS,
@.Browser,
@.Internet,
@.Method,
@.Contacttime,
@.Knowledge,
@.Importance,
@.Sendcopy,
@.Updateme
)
SELECT
@.TicketID = @.@.Identity

INSERT INTO Contacts_to_Tickets
(
U2tUserID,
U2tTicketID
)
VALUES
(
@.ContactID,
@.TicketID
)

INSERT INTO Clients_to_Tickets
(
C2tClientID,
C2tTicketID
)
VALUES
(
@.ClientID,
@.TicketID
)

Fixed the problem, it was with my .net code|||The best practice is to constrain, you should use IDENT_CURRENT('Tickets') instead of @.@.IDENTITY when you are inserting into multiple tables. IDENT_CURRENT gives you the last Identity generated in a specific table, as @.@.IDENTITY has no constraint and returns the last Identity of any table in the session or scope.

Based on your execution @.@.IDENTITY will work, but I figured I would throw this out there anyway.

@@Identity being over-written by Insert Trigger in stored procedure.

Hi All

I have a problem with an existing stored procedure that is used to insert a new entry to a table (using an Insert statement).

I have been using the @.@.Identity global variable to return the identity column (id column) back to the calling routine. This has worked fine for years until recently an after insert Trigger has been added to the table being updated.

Now the @.@.Identity is returning the identity value of the trigger that was called instead of the original table insert.

Does anyone know how I can code around this issue (without using a select statement within my stored proc, as these have been known to cause locks in the past).

Thank in advance.

Eamon.Look at SCOPE_IDENTITY and/or IDENT_CURRENT

Regards,

hmscott|||Thank you very much hmscott. SCOPE_IDENTITY works a treat!!!

@@ERROR and @@ROWCOUNT

Since @.@.ERROR is cleared by the very next statement and @.@.ROWCOUNT is cleare
d by the very next statement, how do you save the @.@.ROWCOUNT and then check
the @.@.ERROR from the same statement?
It appears to me that SET @.HOLD_ERROR=@.@.ERROR is clearing the @.@.ROWCOUNT fro
m the SELECT statement just executed...Try:
declare
@.ERROR int
, @.ROWCOUNT int
select
@.ERROR = @.@.ERROR
, @.ROWCOUNT = @.@.ROWCOUNT
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:684F45E8-4501-4A45-9FE9-A3A5AA9FCB81@.microsoft.com...
Since @.@.ERROR is cleared by the very next statement and @.@.ROWCOUNT is
cleared by the very next statement, how do you save the @.@.ROWCOUNT and then
check the @.@.ERROR from the same statement?
It appears to me that SET @.HOLD_ERROR=@.@.ERROR is clearing the @.@.ROWCOUNT
from the SELECT statement just executed...|||Thanks - that just dawned on me as well. Brain freeze - shouldn't develop
and talk to the customers at the same time...
I'm so set against using SELECT to set variable values - is there a justific
ation for that feeling I have, or did I dream it up...|||Steve Z wrote:

> I'm so set against using SELECT to set variable values - is there a justification
for that feeling I have, or did I dream it up...
I have the same phobia and usually always find myself using SET. The
only time I use SELECT is when I want something from a table.
Aaron Weiker
http://blogs.sqladvice.com/aweiker
http://aaronweiker.com/|||http://www.tkdinesh.com/faq/ans/setorselect.html
No performance penalty or anything like that, but it does violate the
standard (perhaps important if you want to write code that's as portable as
possible).
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:AA0BCA4F-61A1-4C32-8D4E-DB100850EB70@.microsoft.com...
> Thanks - that just dawned on me as well. Brain freeze - shouldn't
develop and talk to the customers at the same time...
> I'm so set against using SELECT to set variable values - is there a
justification for that feeling I have, or did I dream it up...
>|||So, to beat a dead horse here...
You are saying that SET is preferred syntax to assign variables - and I agre
e and follow this logic...
But in the case of @.@.ERROR and @.@.ROWCOUNT, if you want to save both of those
values at the same time, you must use SELECT.
The higher generation language you go, the looser the rules - I remember the
old days of VAX-11 MACRO - how simple and sweet (and verbose, and complicat
ed and hard to debug)...|||Personally, I prefer SET as I find it easier to read (primary reason) and it
is also ANSI SQL compliant. The one exception is when I have to or really
want to do several assignments in one statement. Your @.@.ERROR and @.@.ROWCOUNT
is one example. Below is another:
SELECT @.fname = au_fname, @.lname = au_lname, @.whatever = whatever
FROM tbl
WHERE pkcol = @.pk
Note for above, if more than one row is returned (bug in design) you will
not get an error, the variables will contain values from the last row
processed. Also, if no row is returned, you the variables will go unchanged.
I know of other programmers who prefer to be consistent, and because of that
always use SELECT for all variable assignments. I'm not one of them, but I
respect that viewpoint.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:9D3418CE-03E2-4A23-836B-8288C110BEF9@.microsoft.com...
> So, to beat a dead horse here...
> You are saying that SET is preferred syntax to assign variables - and I
agree and follow this logic...
> But in the case of @.@.ERROR and @.@.ROWCOUNT, if you want to save both of
those values at the same time, you must use SELECT.
> The higher generation language you go, the looser the rules - I remember
the old days of VAX-11 MACRO - how simple and sweet (and verbose, and
complicated and hard to debug)...|||>> But in the case of @.@.ERROR and @.@.ROWCOUNT,
SELECT.
Not necessarily. I have some examples in this article:
http://vyaskn.tripod.com/difference..._and_select.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:9D3418CE-03E2-4A23-836B-8288C110BEF9@.microsoft.com...
So, to beat a dead horse here...
You are saying that SET is preferred syntax to assign variables - and I
agree and follow this logic...
But in the case of @.@.ERROR and @.@.ROWCOUNT, if you want to save both of those
values at the same time, you must use SELECT.
The higher generation language you go, the looser the rules - I remember the
old days of VAX-11 MACRO - how simple and sweet (and verbose, and
complicated and hard to debug)...|||Vyas,
That you for the interesting article and that neat trick to save both values
at once.
I think, though, in the few cases where the @.@.ROWCOUNT and @.@.ERROR values ar
e important to me, I will use SELECT to save them both.
Steve
-- Narayana Vyas Kondreddi wrote: --
SELECT.
Not necessarily. I have some examples in this article:
http://vyaskn.tripod.com/difference..._and_select.htm
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Steve Z" <szlamany@.antarescomputing.com> wrote in message
news:9D3418CE-03E2-4A23-836B-8288C110BEF9@.microsoft.com...
So, to beat a dead horse here...
You are saying that SET is preferred syntax to assign variables - and I
agree and follow this logic...
But in the case of @.@.ERROR and @.@.ROWCOUNT, if you want to save both of those
values at the same time, you must use SELECT.
The higher generation language you go, the looser the rules - I remember the
old days of VAX-11 MACRO - how simple and sweet (and verbose, and
complicated and hard to debug)...

Sunday, March 25, 2012

@@error

Got a tiny issue that needs help. I have this little
statement:
IF (SELECT CLSRECORD_ACCESSEDID FROM CLSRECORD_ACCESSED = CLSSTATUS.CONTACTID)
Basically what we want to do is to ensure that if the
result from CLSRECORD_ACCESSEDID equals what’s found in
the CLSSTATUS.CONTACTID, to do a rollback transaction.
Probably should be prefaced with an @.@.error...
Just need the correct, clean syntax on the above.DDL would help. It is not clear what tables are involved and what columns
are used. A potential statement is:
if exists (select * from my_table where mycolumn = 'what’s')
... logic for finding
else
... logic for not finding
"Wheel" <neal.pawlowski@.loanpro.com> wrote in message
news:0fa201c38d9e$d7aa5780$a101280a@.phx.gbl...
> Got a tiny issue that needs help. I have this little
> statement:
> IF (SELECT CLSRECORD_ACCESSEDID FROM CLSRECORD_ACCESSED => CLSSTATUS.CONTACTID)
> Basically what we want to do is to ensure that if the
> result from CLSRECORD_ACCESSEDID equals what’s found in
> the CLSSTATUS.CONTACTID, to do a rollback transaction.
> Probably should be prefaced with an @.@.error...
> Just need the correct, clean syntax on the above.
>|||Do you mean:
IF EXISTS(SELECT NULL FROM CLSRECORD_ACCESSED WHERE CLSRECORD_ACCESSEDID =CLSSTATUS.CONTACTID)
?
--
Jacco Schalkwijk
SQL Server MVP
"Wheel" <neal.pawlowski@.loanpro.com> wrote in message
news:0fa201c38d9e$d7aa5780$a101280a@.phx.gbl...
> Got a tiny issue that needs help. I have this little
> statement:
> IF (SELECT CLSRECORD_ACCESSEDID FROM CLSRECORD_ACCESSED => CLSSTATUS.CONTACTID)
> Basically what we want to do is to ensure that if the
> result from CLSRECORD_ACCESSEDID equals what’s found in
> the CLSSTATUS.CONTACTID, to do a rollback transaction.
> Probably should be prefaced with an @.@.error...
> Just need the correct, clean syntax on the above.
>

Thursday, March 22, 2012

If-Then in a select statement ?

I'm pulling a recordset for the last 8 weeks of data, but need to add a true/false flag in the recordset to indicate if the record is within the last 12 hours.

tblData.StartTime is the column that has the time for the record. I'm familiar with datediff() - but how do I check the value returned from that function to get a true/false (or 1/0) returned as a column in the select statement.

Select *, [What do I put here] FROM tblData

Thanks for your help,

AlexDECLARE @.myDateCol datetime
SELECT @.myDateCol = '1/19/2005'
SELECT CASE WHEN DateDiff(hh,@.myDateCol,GetDate()) < 12 THEN 1 ELSE 0 END AS TwelveHour_Ind|||I need to use this in a view...which doesn't support the case statement.

Any other way you can think of?

Thanks,

Alex|||Case statements are only not supported by Enterprise Manager. If you use Query Analyzer, you will be able to use Case statements.|||Use CASE for clarity, but if you like, here is an alternative method in the spirit of that famous Computer Scientist, Dr. Rube Goldberg:

declare @.TestDate datetime
set @.TestDate = '2005-01-19 14:39:29.530'
SET @.TestDate = dateadd(hh, -12, getdate())

select cast(sign(DateDiff(hh, GetDate(), @.TestDate) + 12) + 1 as bit)|||Open EM, and use it for refernece purposes...

NEVER Develop in EM, use QA.

CREATE VIEW myView99 AS
SELECT CASE WHEN DateDiff(hh,@.myDateCol,GetDate()) < 12 THEN 1 ELSE 0 END AS TwelveHour_Ind
, Col2
, Col3
FROM myTable99

Tuesday, March 20, 2012

;?

using ';' is just a demarkation of T-SQL statement.
And its very much different from a GO statement.
GO is for end of a batch and is not something understood by T-SQL Engine but
only by your QA.
And you don't get any performance benifit by adding or removing the ';'
But its better to add the ';', since readability improves anyways and few of
the new features in SQL Server 2005, like the service broker mandates use of
';'. So better to remember using ';' in general than rememberting where all
to use it :)
--
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/>> But its better to add the ';', since readability improves anyways and few
Another instance in SQL 2005 is when you use WITH CTE where it is not the
first statement of the batch. Unless the preceding statement is terminated
with a semi-colon you'll get an error.
Anith|||...unless enclosed in a BEGIN...END block. ;)
There are alternatives to semi-colons.
ML
http://milambda.blogspot.com/

Tuesday, March 6, 2012

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how

to fix this. What did you do to fix this error. I keep on receiving

this error when I ported my application to CF 2.0 from Beta 2 using

Visual Studio 2005.

thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how

to fix this. What did you do to fix this error. I keep on receiving

this error when I ported my application to CF 2.0 from Beta 2 using

Visual Studio 2005.

thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how to fix this. What did you do to fix this error. I keep on receiving this error when I ported my application to CF 2.0 from Beta 2 using Visual Studio 2005.
thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how

to fix this. What did you do to fix this error. I keep on receiving

this error when I ported my application to CF 2.0 from Beta 2 using

Visual Studio 2005.

thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how

to fix this. What did you do to fix this error. I keep on receiving

this error when I ported my application to CF 2.0 from Beta 2 using

Visual Studio 2005.

thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how

to fix this. What did you do to fix this error. I keep on receiving

this error when I ported my application to CF 2.0 from Beta 2 using

Visual Studio 2005.

thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how to fix this. What did you do to fix this error. I keep on receiving this error when I ported my application to CF 2.0 from Beta 2 using Visual Studio 2005.
thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can''t find PInvoke DLL ''dbnetlib.dll''."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how to fix this. What did you do to fix this error. I keep on receiving this error when I ported my application to CF 2.0 from Beta 2 using Visual Studio 2005.
thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

.Net CF 2.0 Error , "Can't find PInvoke DLL 'dbnetlib.dll'."

Hi All,

I'm developing Pocket Pc application, In that i have set of statement, which establishes connection with sql Server 2000 Database. When ever I try to open SqlConnection, I’m getting error "Can't find PInvoke DLL 'dbnetlib.dll'.". Right now i am working in .Net Compact Framework 2.0 , But previously i worked in .Net CF 1.1 i didn’t face problem while doing that. Can any one help me to solve this issue?

My code exactly look like :

Private SqlCmd As New SqlCommand

Private SqlTrans As SqlTransaction

Private SqlConn As SqlClient.SqlConnection

Private SqlCmdBuilder As SqlCommandBuilder

Private SqlDataAdapter As SqlDataAdapter

Public Function Select_DocumentTemplate() As DataSetDocumentTemplate

Dim DocuMentTemplateDs As New DataSetDocumentTemplate

Try

SqlConn = New SqlConnection("Data Source=SERVERNAME;Initial Catalog=DATABASENAME;Persist Security Info=True;User ID=sa")

If SqlConn.State = ConnectionState.Closed Then

SqlConn.Open()

End If

SqlCmd = New SqlCommand

SqlCmd.CommandType = CommandType.StoredProcedure

SqlCmd.CommandText = New StringBuilder(500).Append("Select_documentTemplateDetails").ToString()

SqlCmd.Connection = SqlConn

SqlDataAdapter = New SqlDataAdapter(SqlCmd)

SqlCmdBuilder = New SqlCommandBuilder(SqlDataAdapter)

SqlDataAdapter.Fill(DocuMentTemplateDs.Ncm_DocumentTemplate)

Return DocuMentTemplateDs

Catch ex As Exception

Throw ex

Finally

SqlConn.Close()

End Try

End Function

' When Ever I try to call above method to retrive data from Db , It's giving Missingmethod Exception and error message will be "Can't find PInvoke DLL 'dbnetlib.dll'."

Thanks ,

Jayakumar.A

Please make sure SQL Client CAB is installed on device, you can check in "Remove Programs" applet. If not, please install correct CAB file manually.

CABs can be found in %ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Client\v2.0\"

|||

Hi

Yes, Cab file is not installed , Could you please tell me how to find correct cab File for Intel (R) PXA270 processor. Pocket Pc Model is iPAQ Hx2790.

Thanks ,

Jayakumar.A

|||

It depends on the OS this device is running.

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

|||Hi I am experiencing the same error and I can't find any resources how to fix this. What did you do to fix this error. I keep on receiving this error when I ported my application to CF 2.0 from Beta 2 using Visual Studio 2005.
thanks.|||

Hi ,

This error occurs, when we try to create SQL CE database or Inserting Data into the SQL CE database before loading forms. We can avoid this error if you do that operation after loading Form and other initialization, I was getting that error because I coded that operation in the form load event. And it’s better to use

GC.Collect()

GC.WaitForPendingFinalizers()

Before doing that operations.

Thanks ,

Jayakumar A

|||Looks like an OS bug to me. Just moving some code around a bit can cause this problem to appear or disappear. Also, the only sure fix appears to be a cold boot, i.e., need to reinstall all Cabs.|||

The same problem for me but it apear at the db connection. I work on VS2005 under VB with à CE 5.00 on 7535 Psion whith xscale processor.

I don't find the dbnetlib.dll in any dpendance of the file chose for my application cab.

I would like to install the cab of sqlceclient on the device but i don't now who choose for an xscale procesor.

is someone know that thanks!!!

Sorry for my english

|||

XScale is just an ARM variation, so pick ARM CAB file for Windows CE.

|||


Hi ,

If XScale is just an ARM variation, then you can choose

sql.ppc.wce4.armv4.CAB - PPC 2003

sql.phone.wce5.armv4i.CAB - WM 5.0

-Jayakumar

|||Thanks All, it's work properly now. I have just à problem when i do a cold reset but i think it's because the dll isn't storage in the flash disk. I test that.|||

hi Ilya Tumanov

can you tell me from where i can download "sql.phone.wce5.armv4i.CAB - WM 5.0". and how to install it on PDA.

thanks in advance

|||

Hi Lovelu

Donwload Microsoft SQL Server 2005 Mobile Edition and install.

You can find it in

C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Client\v2.0\wce500\ARMV4I

Bruno

|||

I am using windows mobile 5 pocket PC, I installed sql.phone.wce5.armv4i.CAB but still get the error. Any idea?

|||

On Windows Mobile 5 Pocket PC, to install SqlClient, you need to use:

sql.ppc.wce5.armv4i.CAB

Sunday, February 19, 2012

*pls help (3 day bug)* If statement not returning TRUE when it should

I've had this bug for days now, please take a look to see if you can help. Thx

I made an html table to store values that VBscript pulls from an Microsoft Access data base. I modified code from w3school to do this. Here's the link: http://www.w3schools.com/ado/ado_display.asp.
All I change are the path, table, and field names. It works fine; It prints out the DB info in a table.

However, when I add a simple if statement (poined out in the code below) to ensure that the only data that gets printed is that which has the same zip code as the zip code that the user entered into the html field, nothing gets printed. The if statement always evaluates FALSE, even though I've checked the 2 sides of the condition statement, and they match up. Here's the code:

<!DOCTYPE asp>
<% Response.Buffer = True %>

<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\wwwroot\RH25.mdb"
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT zip, email, skills FROM members"
rs.Open sql, conn
zip = rs("zip")
zw = request.querystring("zipWanted")
response.write "zip= " & zip & " zw= " & zw
%>
<table border="1" width="100%">
<tr>
<%for each x in rs.Fields
response.write("<th>" & x.name & "</th>")
next%>
</tr>
<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields%>
<td>
<%if zip = zw Then <--here's the if statement
Response.Write (x.value)
end if%>
</td>
<%next
rs.MoveNext%>
</tr>
<%loop
rs.close
conn.close
%>
</table></body>
</html>

Thx again.You are setting zip = rs("zip") only for the first record. In your loop to process all the records, you do not reset zip so it still has the same value as it was originally set to. Should be something like this:

<%do until rs.EOF%>
<tr>
<%for each x in rs.Fields
zip = rs("zip")
%>
<td>
<%if zip = zw Then <--here's the if statement
Response.Write (x.value)
end if%>
</td>
<%next
rs.MoveNext%>
</tr>
<%loop

Actually, this isn't a good way to do what you want anyway. If you are only interested in records where zip = zw then you should put that condition in the WHERE clause of your SELECT.|||I try to do what you suggest, but i get this error:

Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.
/RH25/listings_where.asp, line 20

Where line 20 is: rs.open sql, conn

Here's lines 1-20 of the code i'm using:

<% Option Explicit %>

<% Response.Buffer = True %>

<!-- #include file="adovbs.inc" -->

<html>
<body>
<%
dim zw
dim conn
dim sql
dim rs
zw = CStr(Request.Querystring("zipwanted"))
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\wwwroot\RH25.mdb"
sql="SELECT * FROM members WHERE zip='" & zw & "'"
set rs = Server.CreateObject("ADODB.recordset")
rs.open sql, conn

Thx again|||What is the data type of column members.zip? If it is a number then you don't want the single quotes around the zw value.

Monday, February 13, 2012

**Dynamic SQL**

Hi
1)I'm using SQl server 2000,how can I use dynamic sql to pass different
tables' name in a sql statement,I'd be thankful if you give an example.
2)I want to use the calculate field to join some columns instead of
concatination of them in different views,at first: is it a good idea?,
second: does it reduce the speed of fetching data when I'm selecting from
that table?
example: emp(emp_no,emp_name , emp_family, emp_desc)
insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
calculated field.
Thanks,> 1)I'm using SQl server 2000,how can I use dynamic sql to pass different
> tables' name in a sql statement,I'd be thankful if you give an example.
Check out http://www.sommarskog.se/dynamic_sql.html before you go down that
slippery slope.

> 2)I want to use the calculate field to join some columns instead of
> concatination of them in different views,at first: is it a good idea?,
> second: does it reduce the speed of fetching data when I'm selecting from
> that table?
> example: emp(emp_no,emp_name , emp_family, emp_desc)
> insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
> calculated field.
It's generally best to request columns individually and format data in the
presentation layer. This will make your application more scalable.
Hope this helps.
Dan Guzman
SQL Server MVP
"maryam rezvani" <rezvani@.parskhazar.net> wrote in message
news:%23$qrByADFHA.3688@.TK2MSFTNGP14.phx.gbl...
> Hi
> 1)I'm using SQl server 2000,how can I use dynamic sql to pass different
> tables' name in a sql statement,I'd be thankful if you give an example.
> 2)I want to use the calculate field to join some columns instead of
> concatination of them in different views,at first: is it a good idea?,
> second: does it reduce the speed of fetching data when I'm selecting from
> that table?
> example: emp(emp_no,emp_name , emp_family, emp_desc)
> insted of selecting emp_no + emp_name ,make emp_no + emp_name as a
> calculated field.
> Thanks,
>

**Deny**

Hi
I am working with SQL 2000 and I want to prevent some users of some
editing action and I could successfully do it by following statement,
DENY SELECT, INSERT, UPDATE, DELETE
ON authors
TO Mary, John, Tom
Now, I want to know how can I automatically deny some new tables or views
which will be created after the time I performed Deny command. Mary, John,
Tom are all db_owner and automatically will be granted to all actions when
a new table created, but I want to perform above command automatically for
each new table which begins with 'au', How is it possible?
I would be grateful if you help me.Hi
If those users are not members of dbo_owner database role so they would not
have an access to the new object created as dbo or other user
<R> wrote in message news:ops7g4arqwmw7tkz@.system109.parskhazar.net...
> Hi
> I am working with SQL 2000 and I want to prevent some users of some
> editing action and I could successfully do it by following statement,
> DENY SELECT, INSERT, UPDATE, DELETE
> ON authors
> TO Mary, John, Tom
> Now, I want to know how can I automatically deny some new tables or views
> which will be created after the time I performed Deny command. Mary, John,
> Tom are all db_owner and automatically will be granted to all actions when
> a new table created, but I want to perform above command automatically for
> each new table which begins with 'au', How is it possible?
> I would be grateful if you help me.|||DENY is only needed is when you want to negate a previous GRANT and is
usually done when permissions are inherited via role membership. However,
db_owner is a special role that allows members to have the same permissions
as the object owner. Since permissions are not checked for object owners,
GRANT and DENY have no affect on db_owner role members.
The bottom line is that Mary, John and Tom should not be db_owner role
members if you need to restrict their permissions in the database.
Hope this helps.
Dan Guzman
SQL Server MVP
<R> wrote in message news:ops7g4arqwmw7tkz@.system109.parskhazar.net...
> Hi
> I am working with SQL 2000 and I want to prevent some users of some
> editing action and I could successfully do it by following statement,
> DENY SELECT, INSERT, UPDATE, DELETE
> ON authors
> TO Mary, John, Tom
> Now, I want to know how can I automatically deny some new tables or views
> which will be created after the time I performed Deny command. Mary, John,
> Tom are all db_owner and automatically will be granted to all actions when
> a new table created, but I want to perform above command automatically for
> each new table which begins with 'au', How is it possible?
> I would be grateful if you help me.|||Even if you could deny these people access, if they are in the db_owner
role, they could just grant the rights back to themselves!
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:OC6CJg9VGHA.1160@.TK2MSFTNGP09.phx.gbl...
> DENY is only needed is when you want to negate a previous GRANT and is
> usually done when permissions are inherited via role membership. However,
> db_owner is a special role that allows members to have the same
> permissions as the object owner. Since permissions are not checked for
> object owners, GRANT and DENY have no affect on db_owner role members.
> The bottom line is that Mary, John and Tom should not be db_owner role
> members if you need to restrict their permissions in the database.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> <R> wrote in message news:ops7g4arqwmw7tkz@.system109.parskhazar.net...
>

Saturday, February 11, 2012

(Urgent) Update statement takes for ever to excecute

Hi, i am trying to Update some records in my table but the update statement is taking for ever ...this is my update Statements

UPDATE Statements..ParticipantFundBalancesSETAct1 = ACT_ID1,TotAct1 = TOT_ACT1,Act2 = ACT_ID2, TotAct2 = TOT_ACT2, Act3 = ACT_ID3, TotAct3 = TOT_ACT3,Act4 = ACT_ID4,TotAct4 = TOT_ACT4,Act5 = ACT_ID5,TotAct5 = TOT_ACT5,Act6 = ACT_ID6,TotAct6 = TOT_ACT6, Act7 = ACT_ID7, TotAct7 = TOT_ACT7,Act8 = ACT_ID8,TotAct8 = TOT_ACT8,Act9 = ACT_ID9,TotAct9 = TOT_ACT9,Act10 = ACT_ID10,TotAct10 = TOT_ACT10,Act11 = ACT_ID11,TotAct11 = TOT_ACT11,Act12 = ACT_ID12,TotAct12 = TOT_ACT12,Act13 = ACT_ID13,TotAct13 = TOT_ACT13,Act14 = ACT_ID14,TotAct14 = TOT_ACT14,Act15 = ACT_ID15,TotAct15 = TOT_ACT15,Act16 = ACT_ID16,TotAct16 = TOT_ACT16,Act17 = ACT_ID17,TotAct17 = TOT_ACT17,Act18 = ACT_ID18,TotAct18 = TOT_ACT18,/*Act19 = ACT_ID19,TotAct19 = TOT_ACT19,Act20 = ACT_ID20,TotAct20 = TOT_ACT20, */ OpeningUnits = UNIT_OP,OPricePerUnit = PRICE_OP,ClosingUnits = UNIT_CL,CPricePerUnit = PRICE_CL,AllocationPercent = ALLOC_PER1FROMStatements..ParticipantFundBalances pfbJOIN (Selectcp.PlanId,p.ParticipantId,@.PeriodId Period,CASE WHEN a.FUND_ID = 'LOAN' Then 0 ELSEf.FundId END FundId,a.ACT_ID1,a.TOT_ACT1,a.ACT_ID2,a.TOT_ACT2,a.ACT_ID3,a.TOT_ACT3,a.ACT_ID4,a.TOT_ACT4,a.ACT_ID5,a.TOT_ACT5,a.ACT_ID6,a.TOT_ACT6,a.ACT_ID7,a.TOT_ACT7,a.ACT_ID8,a.TOT_ACT8,a.ACT_ID9,a.TOT_ACT9,a.ACT_ID10,a.TOT_ACT10,a.ACT_ID11,a.TOT_ACT11,a.ACT_ID12,a.TOT_ACT12,a.ACT_ID13,a.TOT_ACT13,a.ACT_ID14,a.TOT_ACT14,a.ACT_ID15,a.TOT_ACT15,a.ACT_ID16,a.TOT_ACT16,a.ACT_ID17,a.TOT_ACT17,a.ACT_ID18,a.TOT_ACT18,/*a.ACT_ID19,a.TOT_ACT19,a.ACT_ID20,a.TOT_ACT20, */a.UNIT_OP,a.PRICE_OP,a.UNIT_CL,a.PRICE_CL,Cast(Rtrim(i.ALLOC_PER1)as decimal)as ALLOC_PER1FROMASDBF a-- Derive the unique PlanId from the Statements ClientPlan tableINNERJOIN Statements..ClientPlan cpON a.PLAN_NUM = cp.ClientPlanIdANDcp.ClientId = @.ClientId-- Derive the unique ParticipantId from the Statements Participant tableINNERJOIN Statements..Participant pON a.PART_ID = p.PartId
--Derive the unique FundID from the Statements Fund Table...
Left OuterJOIN Statements..Fund fONa.FUND_ID = f.CusipORa.FUND_ID = f.TickerORa.FUND_ID = f.ClientFundId-- get the allocation percent from the INVSRCLEFTOuter JOIN INVSRC iONa.FUND_ID = i.INV_IDANDa.PLAN_NUM = i.Plan_NumberANDa.PART_ID = i.PART_IDWHEREa.Import = 1)aON pfb.PlanId = a.PlanIdANDpfb.ParticipantId = a.ParticipantIdANDpfb.PeriodId = PeriodIdAND pfb.FundId = a.FundId

While i insert data in my table i am checking if there are any loans in the ASDBF table and if there i am inserting a 0 in the particular

i am trying to up date the with in 3 different plans in the same table..

any help will be appreciated.

Regards

Karen

Never mind i fixed it by doing a group by..

Regards

Karen

(URgent) My update statement is not working..

Hi..

I have inserted couple of data in a particular table which is as follows..

Portfolio Table

PortId PlanId PortfolioName PorfolioDescription ClientPortolioId

77117838BALPORT NULLNULL77217838HIGHGROW NULLNULL77317838MODGROW NULLNULL

My FundDBF is as follows

RowNumber FUND_ID f.ASSETDESC Import

20BALPORT Balanced True21MODGROW Moderate Growth True22HIGHGROW High Growth True

and this is my Update statement

UPDATE Statements..PlanPortfolioSETPlanId = pm.PlanId,PortfolioName = pm.FUND_ID, PortfolioDescription = pm.ASSETDESCFROMStatements..PlanPortfolio pJoin (SELECT DISTINCTp.PlanId,pd.FUND_ID,f.ASSETDESC ---pd.FUND_IDFROMPartDBF pdINNERJOIN Statements..ClientPlan pon pd.PLAN_NUM = p.ClientPlanIdINNERJOIN FundDBF fon pd.FUND_ID = f.FUND_IDWHERE pd.Import = 1AND NOT (pd.FUND_IDISNULLORLen(pd.FUND_ID) = 0ORpd.FUND_IDNOT IN (SELECTPortfolioNameFROMStatements..PlanPortfolio ppWherepp.PlanId = p.PlanId))) pmon p.PlanId = pm.PlanId

I am trying to put the above table with f,AssetDesc in the PorfolioDescription field..

Any help will be appreciated..

Regards

Karen

Can you provide the result of this query:

SELECT DISTINCT
p.PlanId,
pd.FUND_ID,
f.ASSETDESC ---pd.FUND_ID
FROM
PartDBF pd
INNERJOIN Statements..ClientPlan p
on pd.PLAN_NUM = p.ClientPlanId
INNERJOIN FundDBF f
on pd.FUND_ID = f.FUND_ID
WHERE
pd.Import = 1
AND NOT (
pd.FUND_IDISNULL
OR
Len(pd.FUND_ID) = 0
OR
pd.FUND_IDNOT IN (
SELECT
PortfolioName
FROM
Statements..PlanPortfolio pp
Where
pp.PlanId = p.PlanId
)
)

|||

Karen,

Not for nothin' but if those are real table and column names from your database, you are exposing a lot more than you should of what is obviously a very sensitive database.

|||

charles i have change the database Name.... and included dummy names...

|||

Dinakar,

when i ran that query the result set is empty..

Regards

Karen

|||

Sorry Karen, just making sure - I had a guy post a month ago who posted some stuff he shouldn't have and we wound up taking the thread down.

|||

so until the query I posted (you subquery) returns something your UPDATE will not work. Take the SELECT I posted and start with that..

|||

Dinakar ,

I updated the query bit to this

Update Statements..PlanPortfolioSET--SELECT Distinct PlanId = pd.PlanId, PortfolioName = pd.FUND_ID, PortfolioDescription = pd.ASSETDESCFROMStatements..PlanPortfolio pJoin (SELECT DISTINCTcp.PlanId,pd.FUND_ID,f.ASSETDESC--pd.FUND_IDFROMPartDBF pdINNERJOIN Statements..ClientPlan cpon pd.PLAN_NUM = cp.ClientPlanIdINNERJOIN FundDBF fon pd.FUND_ID = f.FUND_ID/*AND NOT (pd.FUND_ID IS NULLORLen(pd.FUND_ID) = 0OR *//*AND NOT EXISTS (SELECTPortfolioName--PortfolioDescriptionFROMStatements..PlanPortfolio ppWherepp.PlanId = cp.PlanId) */--)) pdon p.PlanId = pd.PlanId
 
and when i run the select distinct part i get this

17841 BALPORT Balanced

17841 HIGHGROW High Growth

17841 MODGROW Moderate

which is correct but rem out the Select distinct and use an update it doesnt do any thing...

I dont know whats going wrong

|||

You just need to update the desctription.

Update Statements..PlanPortfolio
SET
--SELECT Distinct
PlanId = pd.PlanId,
PortfolioName = pd.FUND_ID,
PortfolioDescription = pd.ASSETDESC

Also, what does this return:

SELECT DISTINCT
cp.PlanId,
pd.FUND_ID,
f.ASSETDESC--pd.FUND_ID
FROM
PartDBF pd
INNERJOIN Statements..ClientPlan cp
on pd.PLAN_NUM = cp.ClientPlanId
INNERJOIN FundDBF f
on pd.FUND_ID = f.FUND_ID

|||

The Select distinct returns

17841 BALPORT Balanced
17841 HIGHGROW High Growth
17841 MODGROW Moderate

|||

So your subquery is returning 3 rows for same planId of 17841? which is different from planid of 17838 in the outer SELECT ?

|||

actually it is right cause i have delete plan Id 17838 and inserted a new plan..|||

Dinakar,

The reason its not updating it because for every result returned in the Select Distinct query has a different portfolioId... so if i just update the portfolio desicription its gonna do that for all the descriptions who planId matches ...

so do u have any ideas..

Regards

Karen

|||

Run these queries again:

SELECT DISTINCT cp.PlanId,pd.FUND_ID,f.ASSETDESC--pd.FUND_IDFROM PartDBF pdINNERJOIN Statements..ClientPlan cpon pd.PLAN_NUM = cp.ClientPlanIdINNERJOIN FundDBF fon pd.FUND_ID = f.FUND_IDSELECT Distinct PlanId = pd.PlanId, PortfolioName = pd.FUND_ID, PortfolioDescription = pd.ASSETDESCFROM Statements..PlanPortfolio pJoin (SELECT DISTINCT cp.PlanId,pd.FUND_ID,f.ASSETDESC--pd.FUND_IDFROM PartDBF pdINNERJOIN Statements..ClientPlan cpon pd.PLAN_NUM = cp.ClientPlanIdINNERJOIN FundDBF fon pd.FUND_ID = f.FUND_ID) pdON p.PlanId = pd.PlanId
|||

Dinakar this is the result of both of my queries and they are the same

17842 BALPORT Balanced
17842 HIGHGROW High Growth
17842 MODGROW Moderate