There is a server in my company and its IP address has changeed yesterday !
And now there is a asp page could not work !
it shows:
Microsoft Cursor Engine error '80004005'
Data provider or other service returned an E_FAIL status.
/ccall/split.inc, line 23
here is the code:
<%
mypage=request("whichpage")
If mypage="" then
mypage=1
end if
mypagesize=request("pagesize")
If mypagesize="" then
mypagesize=200
end if
mysql=request("SQLquery")
IF mySQL="" THEN
mySQL=SQL
END IF
myrs.cursorlocation=3
myrs.cachesize=5
myrs.Open sql,myconn,adOpenStatic
if not myrs.eof and not myrs.bof then
myrs.movefirst
myrs.pagesize=mypagesize
maxpages=cint(myrs.pagecount)
maxrecs=cint(myrs.pagesize)
myrs.AbsolutePage=mypage
howmanyrecs=0
howmanyfields=myrs.fields.count -1
end if
%>
what make me confused is that it can work fine before ip changing.
-- EDIT --
set myconn=server.createobject("ADODB.CONNECTION")
myconn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("order.mdb") & ";"
Related
On Airflow 2.2.4 (Postgres and Celery).
I have a connection created for Microsoft SQL Server. When I try to test the connection, UI asked me to enter API Auth user/password (Basic Auth) and showed up a green flash "Connection successfully tested"
But,
When I use the same connection ID in an Operator definition to run some SQL queries, I am getting an error as below.
pymssql._mssql.MSSQLDatabaseException: (20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (<IP>)\nNet-Lib error during Connection timed out (110)\n
DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (<IP>)\n
Net-Lib error during Connection timed out (110)\n')
Here is what my code from my custom operator looks like,
def get_update_num(self):
conn = None
try:
query = f"""
UPDATE SOME_TABLE
SET COL_A = COL_A+1
OUTPUT INSERTED.COL_A
WHERE COL_ID='12345'
self.log.info(f"SQL = {query}")
conn_id = self.conn_id # This is equal to MSSQL_CONNECTION
hook = MsSqlHook(mssql_conn_id=conn_id)
conn = hook.get_conn()
hook.set_autocommit(conn, True)
cursor = conn.cursor()
cursor.execute(query)
row = cursor.fetchone()
self.log.info(f"row = {row}")
return row[0]
except Exception as e:
message = "Error: Could not run SQL"
raise AirflowException(message)
finally:
if not conn:
conn.close()
Any help would be much appreceated.
I try to use IMAP object from Chilkat AcitveX component.
$oImap.Login($sImapUserName, $sImapPassword)
ConsoleWrite(#ScriptLineNumber & ' LOGIN: ' &$oImap.LastErrorText & #CRLF)
Returns:
Login:
DllDate: Sep 28 2020
ChilkatVersion: 9.5.0.84
UnlockPrefix: ******************
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
loginX:
greeting: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Debian) ready.
authenticateLogin:
loginImap:
ConnectionType: Unencrypted TCP/IP
--loginImap
isOK:
serverResponse: aaab OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY SPECIAL-USE QUOTA] Logged in
--isOK
--authenticateLogin
--loginX
Success.
--Login
I use this snippet:
Local $s_refName = ''
Local $s_wildcardedMailbox = '*'
Local $oMBoxes = $oImap.ListMailboxes($s_refName, $s_wildcardedMailbox)
ConsoleWrite(#ScriptLineNumber & ' ' &$oImap.LastErrorText & #CRLF)
Returns:
ListMailboxes:
DllDate: Sep 28 2020
ChilkatVersion: 9.5.0.84
UnlockPrefix: *****
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
listMailboxes:
bSubscribedOnly: 0
reference:
mailbox: *
Escaping quotes and backslashes in mailbox name...
utf7EncodedMailboxPath: *
isOK:
serverResponse: aaac OK List completed (0.016 + 0.000 + 0.015 secs).
--isOK
Success.
--listMailboxes
Success.
--ListMailboxes
Problem description:
I try to get Listboxes collection object but I do not get properly collections of objects.
If I check it like this:
ConsoleWrite('! ' & IsObj($oMBoxes) & #CRLF)
RESULT: ! 0
ConsoleWrite('! ' & VarGetType($oMBoxes) & #CRLF)
RESULT: ! Object
ConsoleWrite('! ' & $oMBoxes.Count)
RESULT: from COM Error Handler I get:
err.number is: 0x00000004
err.windescription: NULL Pointer assignment
eventually using diffrent version of AutoIt I get:
err.number is: 0x00000003
err.windescription: Object Invoke failed
Question:
Any idea of the cause of the problem?
Registering object by using:
regsvr32 ChilkatAx-9.5.0-win32.dll
Fix this issue.
I'm new in scripting. I need the code to receive some arguments and execute it in hidden cmd in HTA.
the command to execute is
netsh wlan set hosted mode=allow ssid="name" key="pwd"
Here i want to get "name" and "pwd" from submit box and execute the above command in hidden hta.
I made it, but not working properly. See
<script language="VBScript" type="text/vbscript">
set objShell = CreateObject("WScript.Shell")
strOut=""
sub StartProgram
cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & T1.value "key=" & T2.value
iReturn=objShell.Run(cmdarg, 0, True)
If iReturn = 0 Then
MsgBox "Success"
Else
MsgBox "Cannot Start"
End If
TraceOut.innerHTML= strOut
end sub
</script>
I don't know if this is the whole problem, but at the very least:
cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & T1.value "key=" & T2.value
should be
cmdarg="%comspec% /c netsh wlan set hosted mode=allow ssid=" & T1.value & " key=" & T2.value
In other words, you left an ampersand out after T1.value, and left a space out before key=.
Somebody can help me to find the cause for the error: Provider error '8000ffff' Catastrophic failure In DB2 Server version 10.1.0.2?
The ASP code showed below works fine with DB2 Connect version 9.7.2:
ConnectStr = "Driver={IBM DB2 ODBC DRIVER};Database=DBXX;Uid=myuser;Pwd=pypass;Hostname=localhost;Port=50000;Protocol=TCPIP;"
set con0 = CreateObject( "ADODB.Connection" )
Con0.Open ConnectStr
set rs = CreateObject( "ADODB.Recordset" )
rs.ActiveConnection = Con0
rs.Open "select * from sysibm.sysdummy1", Con0
response.write(now & " --->>>" & rs(0))
con0.close()
set rs = nothing
set con0 = nothing
After installing the new driver of DB2Connect 10.1.0.2 Server this error starts to happen.
Our environment is:
- Windows Server 2003 R2 32 bits running in vmware
- MDAC 2.8 SP2
- OLEDB32.DLL 2.82.3959.0
Any suggestion is apreciated.
After removing some information from the connection string, everything started to work perfectly, to my surprise.
The connection string looks like this:
ConnectStr = "Driver={IBM DB2 ODBC DRIVER};Database=DBXX;Uid=myuser;Pwd=pypass;"
I wrote simple pro*c program to check database connectivity. The code is :
int main()
{
char *conn_string = "IDA/IDA#DBISPSS";
int x = 10;
printf("value of x is before db connection %d\n",x);
printf(" conn_string %s \n",conn_string);
EXEC SQL CONNECT :conn_string;
EXEC SQL SELECT 1 INTO :x FROM DUAL;
printf("value of x is %d\n",x);
return 0;
}
Following commands I executed to create exectuable (test_connection) of pro*c code
proc test_connection.pc
cc -I${ORACLE_HOME}/precomp/public -c test_connection.c
cc test_connection.o -o test_connection -L$ORACLE_HOME/lib -lclntsh
and when I executed test_connection exe,the output is
value of x is before db connection 10
conn_string IDA/IDA#DBISPSS
Segmentation fault
But the same code workes well in another linux machine and solaris machine.
Why segmentation fault is thrown?
I tested in HPUX 11.11/Oracle 11 and work ok. I don't see any problem, but try some changes:
Declare 'x' into a DECLARE SECTION:
EXEC SQL BEGIN DECLARE SECTION;
int x = 0;
EXEC SQL END DECLARE SECTION;
Try this connection command:
EXEC SQL BEGIN DECLARE SECTION;
char *user = "abc", *password = "123", *database="base";
EXEC SQL END DECLARE SECTION;
EXEC SQL DECLARE BASE_HANDLE DATABASE;
...
EXEC SQL CONNECT :user IDENTIFIED BY :password AT BASE_HANDLE USING :database;
...
EXEC SQL AT BASE_HANDLE SELECT 1...
Insert a printf("here 1"); between EXEC SQL CONNECT... and EXEC SQL SELECT ... to see where SEGFAULT is thrown.
I had that problem and no amount of fiddling with my source made any difference. What finally worked was when I reinitialized all (ALL) my libraries to make sure that Oracle only had access to the 32 bit versions of the library. It seems Oracle was somehow getting connected to a 64 bit library. Only by removing all references to any libraries or executables except the 32 bit versions worked. This included running a 32 bit version of Pro*C.