What version of VB are you using ?
VB6, VB.NET, VBA ?
What code have you got so far ?
User Profile
Collapse
-
You say that you :
'need only the modified cells to be replaced in the database'.
I presume you mean the rows, not cells.
You'll need a second 'snapshot' of the data in order to make the comparison to find which rows have been changed.
You could put this in a second hidden worksheet.
Question : How many users will be accessing the Excel at any one time ?
If...Leave a comment:
-
First, check if the record exists, if not then add it to the table :
IF NOT EXISTS (SELECT (1) FROM 'table' WHERE FNAME = 'name')
Insert new record into table
Now update the table
UPDATE 'table'
SET TimeStamp = CURRENT_TIMESTA MP
WHERE fname = 'name'Leave a comment:
-
You're going to have to save the 'Counter' information outside of the application. The easiest way is probably a text file, that is read in as part of the application initialisation.Leave a comment:
-
You're selecting two variables :
SELECT count(id) as countr, username
...Of course you can't assign the result to a single variable !!!!
Also, It looks very likely that you would get multiple records as a result of the query. Again....Of course you can't assign the result to a single variable !!!!
It's not the parameter. It's the query.Leave a comment:
-
Are the two indexes zero-based
row = Me.dtgCustomSch ed.CurrentRowIn dex
.
.
.
addSchedule.Tab le("ttcpcustomi zedschedule").R ows.RemoveAt(ro w)
If they have different bases, then you might need to do the following :
row = Me.dtgCustomSch ed.CurrentRowIn dex - 1
Or
addSchedule.Tab le("ttcpcustomi zedschedule").R ows.RemoveAt(ro w + 1)Leave a comment:
-
My mistake.....the format should be : DatabaseName.Da tabaseOwner.Dat abaseTable
ie
Antrix.dbo.crea ture_proto
Antrix2.dbo.cre ature_proto
NOT
dbo.Antrix.crea ture_proto
dbo.Antrix2.cre ature_protoLeave a comment:
-
-
The esteemed Killer42 is correct.
If you need more help, shout !Leave a comment:
-
It's hard to say what the problem is without seeing the code.
It's a bit drastic, but you could zip the VB projects up & post them, or if they're too big, then email them to me at
<E-mail address removed by Moderator>Last edited by Killer42; Jul 12 '07, 11:08 PM. Reason: Removed e-mail address as per site guidelinesLeave a comment:
-
Could you give some indication of how far you have got. then the problem would be easier to diagnose.Leave a comment:
-
What version of VB are you using ?
If its VB6, Then check out the ADODB.Connectio n & ADODB.Command objects
If you haven't got the MSDN library installed, then Run Google searches.Leave a comment:
-
Generate two new variables
Code:DECLARE dtStart as Date DECLARE dtEnd as Date dtStart = CDate (Form.startdate) dtEnd = CDate (Form.enddate)
Code:SELECT * FROM tbldata WHERE datee BETWEEN dtStart AND dtEnd
Leave a comment:
-
Before thinking about rewriting the SQL query, try extending the timeout on the database connection object / SQL command object. I think the default is 30 secs. Make it 180 secs & see what happens.
If this does the trick, then think about rewriting the SQL query.Leave a comment:
-
I think you need to redeploy the progarm. Use VB6 to build the installtion package. This will now include the Winsock control that you added.Leave a comment:
-
....where entries in Antrix.entry arent in antrix2.entry.. it sets the data from Antrix.health to 0 on those entries.
Yes, It Will !
Try something like :
Code:UPDATE dbo.Antrix.creature_proto SET health = dbo.Antrix2.creature_proto.health WHERE dbo.Antrix.creature_proto.entry = dbo.Antrix2.creature_proto.entry
Leave a comment:
-
There is some useful info on duplicate records in the following article.
http://www.kodyaz.com/articles/delete-duplicate-records-rows-in-a-table.aspx
I know it's to do with deleting duplicates, but it should give you some ideas.Leave a comment:
-
My apologies for being thick, but by redundancy, do you mean duplicate records ?
Could you give a brief example from the table of records that are deemed redundant, then I can suggest a means of selecting them.
CheersLeave a comment:
-
What do you mean by redundancy ?
Do you mean records that are older than a specific date ?Leave a comment:
-
The CASE statement will only execute the first WHEN expression that evaluates to True & generally assumes that the WHEN expressions are mutually exclusive.
Eg
Code:CASE WHEN (Value < 0) THEN 'Neg' WHEN (Value = 0) THEN 'Zero' WHEN (Value > 0) THEN 'Pos' ELSE 'Undefined' END
Leave a comment:
No activity results to display
Show More
Leave a comment: