atinobrian 7 Newbie Poster

you are trying to insert two values (canAdd and canEdit) in a single row, but treeview will loop twice for two checkboxes , plus your insert statement is inside the loop hence two entries

By the way what does getcheck function do here ?

atinobrian 7 Newbie Poster

you can check the previous url using HTTP_Referer, You can get the current domain name by using Request.ServerVariables("server_name")

atinobrian 7 Newbie Poster

you are trying to pass sno as a parameter, Is sno an auto generated Identity key column ? if so then you cannot pass value to sno while inserting as the values will be autogenerated . In any case kindly post more details

atinobrian 7 Newbie Poster

@@Fetch_Status Returns the status of the last cursor FETCH statement issued against any cursor currently opened by the connection.
Since you have not opened a Cursor yet , its giving -1 as a value.
check this msdn article for more details
http://msdn.microsoft.com/en-us/library/ms187308.aspx

atinobrian 7 Newbie Poster

well hereis a more simpler way
Delete t1 from <tbl_> t1,<tbl_> t2
where t1.ID= t2.ID
and t1.[Date] <t2.[Date]

atinobrian 7 Newbie Poster

Please check if you are able to connect using sql server management studio on the same name "naheed-pc1\mycloudflash" if not, then use the same name as shown in the sql server management studio

atinobrian 7 Newbie Poster

Dim is used for declaring a variable without dim you won't be able to use the variable.
Now setting of variables to random value might be for testing purposes or , avoiding the null error

atinobrian 7 Newbie Poster

what part are you not able to understand we can go part by part on this :),comments are making it self explanatory, anyways kindly start with what part of this code are u finding hard to understand

atinobrian 7 Newbie Poster
select * from Reports where UserId = @id and datepart(mm,ReportDate) = @month and datepart(year,reportdate)= @year
atinobrian 7 Newbie Poster
update t1
set t1.status = 'X' from t2
inner join t1 on t2.txn_id = t1.txn_id 
where t2.date < sysdate.

:)

atinobrian 7 Newbie Poster

.aspx are you saying you want to convert a web form to a .jad ( which is like a windows application) ?
I think you need to use windows project for making installable applications on mobile

atinobrian 7 Newbie Poster

Ok, so now I got past that error and now, there's an error with the joins? this is definitely not something I'm that good with yet. I am receiving the following error:

syntax error (mising operator) in query expression '

dbo.CLIENT ON dbo.PHONE.CLIENT_ID = dbo.CLIENT.CLIENT_ID RIGHT OUTER JOIN
dbo.CLIENT_TRANS ON dbo.CLIENT.CLIENT_ID = dbo.CLIENT_TRANS.CLIENT_ID LEFT OUTER JOIN
dbo.TRANS_CD ON

SELECT     dbo.CLIENT_TRANS.CLIENT_ID, 
                 dbo.CLIENT_TRANS.TRANS_CD_ID, 
                 dbo.TRANS_CD.TRANS_CD_DESC, 
                 dbo.CLIENT_TRANS.ITEM_ID, 
                 dbo.CLIENT_TRANS.ACT_TRANS_TS, 
                 dbo.CLIENT_TRANS.ACT_TRANS_DESC, 
                 dbo.CLIENT_TRANS.ACT_TRANS_AMT, 
                 dbo.CLIENT_TRANS.USER_ID, 
                 dbo.CLIENT.FIRST_NAME, 
                 dbo.CLIENT.LAST_NAME, 
                 dbo.CLIENT.ACCOUNT, 
                 dbo.CLIENT.FILTER_CODE_ID,
                 dbo.CLIENT_TRANS.PAYOUT_ID, 
                 dbo.ITEM.ITEM_NUM, 
                 dbo.ITEM.ITEM_NAME, 
                 dbo.TRANS_CD.NEGATIVE_IND, 
                 dbo.TRANS_CD.PAYABLE_IND, 
                 dbo.PHONE.PRIMARY_IND, 
                 dbo.PHONE.PHONE_NUMBER, 
                 dbo.PHONE.PHONE_DESC, 
                 dbo.CLIENT_TRANS.TRANS_CD_ID AS Expr1, 
                 dbo.CLIENT_TRANS.HOLD_IND, dbo.TRANS_CD.PAYABLE_IND AS Payable,
            IIf(dbo.CLIENT_TRANS.TRANS_CD_ID IN (1, 2, 5, 11) ,dbo.CLIENT_TRANS.ACT_TRANS_TS,
                   getdate() - 365 * 5) AS ITEMSOLDDATE
FROM         dbo.PHONE                                                                                                                                         RIGHT   OUTER JOIN
                   dbo.CLIENT              ON dbo.PHONE.CLIENT_ID                    = dbo.CLIENT.CLIENT_ID                  RIGHT   OUTER JOIN
                   dbo.CLIENT_TRANS ON dbo.CLIENT.CLIENT_ID                    = dbo.CLIENT_TRANS.CLIENT_ID     LEFT     OUTER JOIN
                   dbo.TRANS_CD        ON dbo.CLIENT_TRANS.TRANS_CD_ID = dbo.TRANS_CD.TRANS_CD_ID      LEFT     OUTER JOIN
                   dbo.ITEM                  ON dbo.CLIENT_TRANS.ITEM_ID          = dbo.ITEM.ITEM_ID
WHERE     (dbo.CLIENT_TRANS.PAYOUT_ID IS NULL) 
                    AND (dbo.PHONE.PRIMARY_IND = 1) 
                    AND (dbo.CLIENT_TRANS.TRANS_CD_ID <> 13) 
                    AND (dbo.CLIENT_TRANS.TRANS_CD_ID <> 8) 
                    AND (dbo.CLIENT_TRANS.TRANS_CD_ID <> 15) 
                    AND (dbo.CLIENT_TRANS.TRANS_CD_ID <> 9)

Is this another incompatibility with access sql and sql?

thanks :)

sql does not support IIF
you have to use CASE

atinobrian 7 Newbie Poster

Can you post your javascript code ? It would make things easier :)

atinobrian 7 Newbie Poster

have a look at the following code for email in asp.net 2.0
http://www.codeproject.com/KB/aspnet/EmailApplication.aspx

and for the relay options see the follwing article
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/58f05ef9-55a3-42b3-9f57-27fdc8723b8a.mspx?mfr=true

it should clear your doubts

atinobrian 7 Newbie Poster

Can you post your code ??

atinobrian 7 Newbie Poster

hi all....
I'm trying mailing concept. After entering FROM address, TO address ,subject and body of the message and while clicking the send button am getting
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for "as@a.com" what wrong i would have made?
Plz guide me

Are you sending your email via IIS ? if yes then most probably your local smtp server is not allowing relay by default. so you must enable relay for that domain or authenticate to the local smtp first. This can be done in the IIS settings :) you can google for it

atinobrian 7 Newbie Poster

Ohh if that is the case then here is the update query,

update Table1
set Table1.X = Table2.X,
      Table1.Y = Table2.Y,
      Table1.Z = Table2.Z
from Table2 inner join Table1 on
Table2.KEY = Table1.Key
where Table1.x <> Table2.x and Table1.y <> Table2.Y 
and Table1.Z <> Table2.Z

This is the basic update code, now you can change the 'and' and 'Or' Placements in the where clause depending upon your choice :)

In your Senario it seems all the table 2 records are there in table 1 so the above query would become

update Table1
set Table1.X = Table2.X,
      Table1.Y = Table2.Y,
      Table1.Z = Table2.Z
from Table2 inner join Table1 on
Table2.KEY = Table1.Key

Hope it helps

johnny.g commented: good knowledge,,explain him the whole problem n he will surely come up with an answer is there's any.. grt keep it up +1
atinobrian 7 Newbie Poster

hmm since there is no primary key in your table
it would be tough to update the records, in the original case there was a composite key so it was easy to find and insert unique records
In any case you should have atleast a primary key or a composite key so that the update can be performed

atinobrian 7 Newbie Poster

well its a little difficult to understand, If its not a hassle can you please provide me with an example , would be much more clear :)

atinobrian 7 Newbie Poster

please mark it solved

atinobrian 7 Newbie Poster

Here is the code

insert into Table A(col1,col2,col3)
select TableB.col1,TableB.col2,TableB.col3 from Table B left outer Join Table A on 
Table B.col1 = Table A.col1 and Table B.col2 = Table A.col2
where TableA.col1 is null or TableA.col2 is null
Ramy Mahrous commented: Very nice solution :) +6
atinobrian 7 Newbie Poster

assuming that the col1 is having unique constraint in both the tables

insert into Table A(col1,col2,col3)
select TableB.col1,TableB.col2,TableB.col3 from Table B left outer Join Table A on 
Table B.col1 = Table A.col1 where TableA.col1 is null
atinobrian 7 Newbie Poster

I think this should help
http://forums.asp.net/p/1001732/1321474.aspx

Please mark the thread as answered if it solves our problem