Thanks so much for your responses. The later worked great. Just needed to add one line of code, "rs.CursorLocation = 3", to get it working.
To be honest I did not try dm4ever's suggest. But it is appreciated. Especially since it helps us with best practices.
Attempting to:
>Query Informix via VBScript
Problem:
>Query always returns -1 records
Analysis:
>Manually queried using MS Query and the same DSN file. Query successfully returns 1 record.
>Changed the DSN and query to Oracle DB and AS400 DB, both work fine.
My code:
"CONST adOpenStatic =...
Here is the issue:
Need to call a vbs using another vbs. Last vbs to be called can also be call from command line using:
"c:\scrpts\myVBS.vbs" /param1:"c:\scripts\log.txt" /param2:"Val2" /param3:"Val3" /param4:"Val4"
This works fine. But when attempting to execute via another vbs it fails...
Thanks all for your thoughtful inputs to helping me find the solution. Special thanks to "tsuji" for putting everything together in the context of the function in question.
Ben
What I am trying to do is return the objects 'cn' and 'rs' from the function below. This is what I have:
Function OpenRecordSet(cn_str, uid, pwd, sql)
Dim cn, rs, dbCollection()
CONST adOpenStatic = 3, adLockReadOnly = 1, adCmdText = &H0001
Set cn = CreateObject("ADODB.Connection")
cn.Open...
I have a table (my.table):
Key Val1 Val2 Val3
xcv abc 1 2
sdf def 1 3
The query (select * from my.table) returns:
Key Val1 Val2 Val3
xcv abc 1.0 2.0
sdf def 1.0 3.0
Any ideas why and how to correct this?
Autonumber sounds like the right path. But not sure how to implement. We have a table that 'users' are querying via a 'user' proof tool. They request the ability to query in 4 ways by unique value 1, unique group 1, range or all. I have all but the range covered. For the range, the users...
This is good. But I also need to select a range of records which are not always at the top. For example, select * from my.table where record_num between 2 and 5.
Need to query a table without row numbers using row numbers. Like in pl-sql we can write the qry "select * from siebel.s_opty where rownum < 10;" Is there anything similiar to "rownum" in MS Access?
Many thanks, to all, for taking the time to add your comments. I was able to use your observations to achieve sub-second query completion time.
benmillus
Any tips on how to make this query run faster? This is the part that really slows it down:
"o.pr_dept_ou_id in
(
select c.pr_dept_ou_id
from s_org_ext oe, s_contact c
where oe.x_name = ' 1234' and c.last_name = '1234'
)"
select ord.order_num,
ordt.name,
orgint.name...
Not getting output for the 'Process ID'.
Here is my code:
Const PROCESS_SET_QUOTA = 256;
Const TRIM_TO_ZERO = 4294967295; # 0xFFFFFFFF or (-1 as a signed long)
Public hWnd, processID, threadID, hProcess, hCurProcess
Declare DllFunc "long GetCurrentProcess() kernel32" _GetCurrentProcess...
Jim, Thanks for relying. I actually resolved this. The solution is:
DELETE TBL.*
FROM TBL
WHERE ((FLD1 In (SELECT FLD1 FROM TBL As Tmp GROUP BY FLD1,FLD2 HAVING Count(*)>1 And FLD2 = FLD2)));
BEN
Have you tried?
EMPTBL = the 15000 record table.
LNFNTBL = the table with only last name (LN) and first name (FN).
SELECT EMPTBL.*
FROM EMPTBL, LNFNTBL
WHERE (EMPTBL.LN = LNFNTBL.LN AND EMPTBL.FN = LNFNTBL.FN)
ORDER BY EMPTBL.LN, EMPTBL.FN;
Is it possible to convert this to delete the duplicate records as they are found? If so how? If not what would you suggest?
SELECT FLD1, FLD2, FLD3, FLD4
FROM DED05
WHERE ((FLD1 In (SELECT FLD1 FROM DED05 As Tmp GROUP BY FLD1,FLD2 HAVING Count(*)>1 And FLD2 = FLD2)))
ORDER BY FLD1, FLD2;
For example, "UPDATE tableName SET [tableName].fieldMessage = 'OTC's Not Covered' WHERE [tableName].fieldNameID1='0403REJ' and [tableName].fieldNameID2='0008';"
Need to update "fieldMessage" with the value "OTC's Not Covered". But the value contains the '...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.