debasisdas 580 Posting Genius Featured Poster

try this, may work for you.

UPDATE runquery.table1 
SET runquery.table1.`Column1` = (select (runquery.table2.`Col1`/runquery.table2.`Col2`*100) from  runquery.table1 , runquery.table2 WHERE runquery.table2.`itemid` = 3 AND runquery.table1.`Userids` = runquery.table2.`userid`, runquery.table1.`Column2` = select (runquery.table2.`Col1`/runquery.table2.`Col2`*100) from  runquery.table1 , runquery.table2 WHERE runquery.table2.`itemid` = 5 AND runquery.table1.`Userids` = runquery.table2.`userid`;
debasisdas 580 Posting Genius Featured Poster

what is the underlying database ?

What is the query that you are using ?

debasisdas 580 Posting Genius Featured Poster

yes that sky rocketed a couple of days back and yesterday nose dived back to where it was

debasisdas 580 Posting Genius Featured Poster

you need to capture value from any control using variable and later use the same in your SQL statemnet.

debasisdas 580 Posting Genius Featured Poster

There is no rule of thumb to follow to optimize a query.

and what you are trying to do is not optimization, but removing some requirements.

debasisdas 580 Posting Genius Featured Poster

yes, now use suggestion by smantscheff

i.e.---commit after every transaction.


as per your situations

User 1 executes Step C (the order with billnumber 51 is inserted)
commit
User 2 executes Step C (the order with billnumber 51 will not be insert as it is duplicate and 52 will be inserted.

debasisdas 580 Posting Genius Featured Poster

the second order would simply not be inserted and be lost.

that is when my previous solution will come handy

debasisdas 580 Posting Genius Featured Poster

Why not check for existence of the value generated (using +1 technique) once before inserting. If it exists increment the same further (+1) and insert.

debasisdas 580 Posting Genius Featured Poster

why not simply try

BillNumber = max(BillNumber) +1

debasisdas 580 Posting Genius Featured Poster

post your complete code .

read more here.

debasisdas 580 Posting Genius Featured Poster

I do not have VB CDO 1:21 Library?

What do you mean by that ?

Try using MAPI controls.

debasisdas 580 Posting Genius Featured Poster

try this

$sql = "SELECT 'name','owner' FROM table WHERE 'verified'='1' AND (name LIKE '$%term%' OR 'owner' LIKE '%$term%')";
debasisdas 580 Posting Genius Featured Poster

please the following links

link1
link2
link3
link4

debasisdas 580 Posting Genius Featured Poster

try this

select studId, courseId, max(yearTaken), grade, count(courseid) as no_of_times
from table
group by studId, courseId
debasisdas 580 Posting Genius Featured Poster

Why you need YEAR if try to display all the failures ?

Does the same course id repeats across all the years ?

debasisdas 580 Posting Genius Featured Poster

Why you need YEAR if try to display all the failures ?

Does the same course id repeats across all the years ?

debasisdas 580 Posting Genius Featured Poster

You need to use DELETE to delete records. Use proper where clause for the same.

If you want to delete all the records simply use DELETE without any WHERE clause.

I don't think TRUNCATE is supported in ACCESS.

debasisdas 580 Posting Genius Featured Poster

better to ask from whom you got this .

debasisdas 580 Posting Genius Featured Poster

just call the routine that is populating the grid in the REFRESH button click event.

debasisdas 580 Posting Genius Featured Poster

you need to query the database a fresh and populate the grid.

debasisdas 580 Posting Genius Featured Poster

timer keeps executing even if you do not insert new record, so consumes system resources un-necessarily.

debasisdas 580 Posting Genius Featured Poster

option1 -- use a refresh button

option2 -- refresh using timer (bad idea)

debasisdas 580 Posting Genius Featured Poster

you need to use COMMON DIALOG CONTROL

debasisdas 580 Posting Genius Featured Poster

It is practically impossible to predict without knowing the actual structure of both the tables and their relations.

debasisdas 580 Posting Genius Featured Poster

try this

theCount = rs.!MaxID
debasisdas 580 Posting Genius Featured Poster

error on which line ?

debasisdas 580 Posting Genius Featured Poster

that did not answer my question.

debasisdas 580 Posting Genius Featured Poster

What is the relation between these two tables ?

debasisdas 580 Posting Genius Featured Poster

May be it got corrupt, you need to repair or reinstall the application.

debasisdas 580 Posting Genius Featured Poster

what application ?
which textbox ?
choose what ?
why choose ?
.... ?

HOW MUCH I NEED TO GUESS ?

debasisdas 580 Posting Genius Featured Poster

my query is partially solved.

lets see your code and make it fully functional.

debasisdas 580 Posting Genius Featured Poster

Hi Emily,

Welcome to Daniweb.

debasisdas 580 Posting Genius Featured Poster

It only Inserts into a New table not already existing table.

Can you post what exactly you have tried , which did not work for you.

debasisdas 580 Posting Genius Featured Poster

Have you tried using

insert into .......select from ......
debasisdas 580 Posting Genius Featured Poster

how to convert vb.net to excel.

So you want to fetch the data from DB using stored procedure and export the data into an Excel sheet, right ?

But no where in your code it refers to any routine that writes to excel sheet.


the following links may be useful to you.

link1
link2
link3

debasisdas 580 Posting Genius Featured Poster

You need to copy only the table data rather than entire table.

Please read more here.

debasisdas 580 Posting Genius Featured Poster

Even if login is a key word, since it is wrapped with [] there should not be any problem.

check for any mispelled or spaces in the column name.

Better to try using a different name as suggested by Jx.

debasisdas 580 Posting Genius Featured Poster

can i view only 2 column in listview, example only column 1 & 2 only in listview..

Yes

if i remove code in line 5 and 6 i will get error...

why ?

If you want to display only 2 columns why you need to add code for 4 columns ?

It may happen my table contains 200 columns but not compulsory to display all the columns.

debasisdas 580 Posting Genius Featured Poster

I think this discussion is good for your reference.

debasisdas 580 Posting Genius Featured Poster

I can't see the block of the code that you are referring to in the code that you have posted here.

debasisdas 580 Posting Genius Featured Poster

As i have already mentioned you can write log into another table.

debasisdas 580 Posting Genius Featured Poster

Read this and this for Exporting of mysql

debasisdas 580 Posting Genius Featured Poster

you it can be, you need a way to establish a request response functionality between the client ans the server.

debasisdas 580 Posting Genius Featured Poster

does this work ?

select CHARINDEX('-', TestNoName), CHARINDEX('-', TestNoName)-1 
from
.....
debasisdas 580 Posting Genius Featured Poster

try this

SELECT SUBSTRING(QCTEST.TESTNAME, 1, CHARINDEX('-',CTEST.TESTNAME)-1)
FROM
....
debasisdas 580 Posting Genius Featured Poster

Yes.

Using the select statement you need to check if the ID already exist.

If not --insert it.
If already exist---try a new ID.

debasisdas 580 Posting Genius Featured Poster

Then you need to write log of each and every transaction.

This is possible if number of tables are less and is highly impractical for a big database with hundreds of tables.

debasisdas 580 Posting Genius Featured Poster

I don't think there will be any difference in performance as per the above mentioned queries if the Joins are proper.

debasisdas 580 Posting Genius Featured Poster

no..is standalone..if i can't browse using asp, can i make that system as server & client?

what browse you are talking about ?

you need to pass more information.

What the application is all about
is there any database ....

debasisdas 580 Posting Genius Featured Poster

Why not make the ID field an auto number .