|
Hi,
I using http://support.microsoft.com/?kbid=320301 as a guide to building a
webservice with a collection of methods for requesting and updating data.
The client will request some data, change it/add more rows, then send it
back to be updated on the server. When the client adds a new row I would
like the identity of the row to be negative, start at -1 and move down.
However when I'm populating the dataset I have to use
FillSchema(ds,SchemaType.Mapped,"Details") if I want the Merge method to
work properly. This prevents my id's from starting at -1, infact it causes
conflicts. Because if the last id in the database is 60, then new rows
added by the client will start at 59. Is there anyway to resolve this? Or
should I omit the FillSchema method and just remove rows with negative id
when the merge is complete? As the client devices are handles, I would like
to keep any extra steps to a minimum.
Any help would be greatly appreciated,
Mark
|
|
|
|
|
Hi friends
My problem is that I want to minus the result of two queries in ms-access. But I wonder if there is any equivalent for minus in access. I should mention that here I can not use NOT IN statement as an equivalent(or I don't know how to use it here!):
I have one query which returns these fields: A , B , C from TableA
and the second query returns some other records with the same fields from TableB . Now how can I subtract the two query results?
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
Hi maysam. Would it work for you to join the two queries with a Left Outer Join on all three fields? then filter for where the returned field from the second query is null.
Something like this...
Select x.A, x.B, x.C
From QueryA x
Left Outer Join
QueryB y on x.A = y.A and x.B = y.B and x.C = y.C
Where y.A is null That should show you all records that are returned in QueryA that don't have a matching record in QueryB, effectively subtracting out the matching records.
|
|
|
|
|
I am going to use it...
Thanks!
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
I have a table that it's PK Field Type is autonumber
I want to enter a record between another records.so the other records after it should increase once.how can i do it with query?
|
|
|
|
|
UPDATE table SET PK =PK+1 WHERE PK>=X
INSERT INTO table(PK) VALUES(x)
But your DB may not allow a direct access to the PK field, depending on the implementation. In that case, simply forget it.
dirk
|
|
|
|
|
i want to use the date part of the function getdate in my sql query.
the getdate function return the current date and time. i want only the date part.
how can i do it.
|
|
|
|
|
Goodway,
First of all I assume you use SQL Server (7.0/2000). If not quit reading.
Then, SQL Servers date/time datatype always consists of a date AND a time part. A date without a time component does not exsist is SQL Server.
If you insert a date value without a time, for example jan 1, 2004, SQL Server inserts the date as 2004/01/01 00:00:00.000 (for smalldatetime skip the milliseconds).
So if you need a date without a time you need to convert a datetime value to a string. You can use the CONVERT-function in SQL (see "CAST and CONVERT" in SQL Books online).
Example:
SELECT CONVERT (varchar(24), GetDate() , 103);
Returns:
01/01/2004 -- Note: the result is a string. Not a datetime value.
Good luck
|
|
|
|
|
Using Dataadapter.Fill, a DS.tables("TBL") was populated with, say, n records. Is there a built-in method / procedure through which one can easily find out the row- number in a datacol of the "TBL" contains a given value.
Say, for example, given datacol("FNAMES") and another string fn_str, is there a readily-available procedure such as :-
dim kt as integer, fn_str as string = "John"
kt = ReadilyAvailable(datacol("FNAMES"), fn_Str)
Here, kt will be a value - either -1 or {0 .. n-1}. -1 indicates that the given value does not exist.
Ofcourse, alternatively, a for-next loop will have to be written, but i wanted to avoid it
|
|
|
|
|
C# syntax:
myDataSet.Tables["mytabl"].Rows.Find() method.
Mazy
"Man is different from animals in that he speculates, a high risk activity." - Edward Hoagland
|
|
|
|
|
thanks, Mazy.
Regards,
Sanjay.
|
|
|
|
|
Whenever you insert a new record, then decide you want to manipulate that record immediately after, is there any easier way to find a reference to it than querying for the last record?
|
|
|
|
|
If you have inserted via Dataadapter>Dataset, then, if the Dataset has not been disposed/cleared off, the inserted record contents will still be in the "tables", from where you could pick it back up.
Hth.
|
|
|
|
|
Thanks, but for this app I'm just using readers and class representations.
If anyone is interested, I found the following:
MySQL: SELECT LAST_INSERT_ID()
MSSQL: RETURN @@IDENTITY
|
|
|
|
|
|
hello friends
i am new to vb.net. can i use "ADO" in vb.net instead of ADO.NET. iam a bit scared to use ADO. becoz all the books suggest to use ADO.NET.
my doubt is if i use ADO then will there be any problems reg. performance, installation ... etc and about the problems that i can't at this level.
please any body guide me.
(i can't accept any guesses .... extreemly sorry for that. i am very much obliged if i can get the correct guidence pls.)
thank in adv.
mohan G
Mohan G
|
|
|
|
|
ADO.net is well formatted and well suited for the applications with the .NET framework... better performance too
I was born intelligent Education ruined me!.
|
|
|
|
|
Hey
i am trying to use CoCreateInstance();but it is giving failure only. i am very beginner to sql server. what may be the reason for this error. is it because of sql server setup?
Please help me.
Thanks
JP
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
CoCreateInstance is a COM API; what COM object are you trying to create? Is the object registered?
If you're not trying to create an ADO object or a SQL-DMO object, please ask on the COM forum.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks for ur reply, I am trying to create OLE-DB provider. But its giving error. Should I register the COM component? I didn't do this. Please help me.
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
Typically a provider will be registered properly by its installer, so that's unlikely to be the problem. Have you called CoInitializeEx or OleInitialize on this thread?
I suggest checking the return value of CoCreateInstance in winerror.h to see if there's a better description of the error.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi Friends,
Is it possible to have both servers installed on same machine and concurrently working?
Vikram S
VikramS
|
|
|
|
|
You mean 2000 - is that 8.0?
You can have them both installed on the same machine. I believe you want 7.0 to exist and then install 2000 as a new instance - but I not sure that is a requirement.
Barbara
|
|
|
|
|
As the other reply... the answer is YES... but I was wondering 'why would u need that'
I was born intelligent Education ruined me!.
|
|
|
|
|
Am having major problems trying to connect an Access database to my webpage via dreamweaverMX.
|
|
|
|