473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

why ODBC socket server cannot open another table in the same MS access database

I am using ODBC socket server to connect to a remote MS Access database. It does have table employee and timecard. When i send a query to employee table it successfully returned values by when I tried it to timecard table it will not respond.

Here is a chunk of my code:

$result = $db->execute("SELECT employeeid, lname, fname, mname from employee","employee");

$result = $db->execute("SELECT * FROM timecard","timecard");

//this two queries are not send the same time, i just alternately used them.
.
.
.
.
class ODBCSocketServer{

function execute($SQL, $table1) {
$this->table = $table1;

if (!$this->_sendSQL($SQL)) return false;
}

function _sendSQL($sSQL){

$socket = fsockopen($this->HostName, $this->Port, $errno, $errstr, 30);

$sSQL = HTMLSpecialChars($sSQL);
$sSend = "<?xml version=\"1.0\"?>\r\n<request>\r\n<connectionstrin g>$this->ConnectionString</connectionstring>\r\n<sql>$sSQL</sql>\r\n</request>\r\n";

//write request
fputs($socket, $sSend);
$result = "";

//now read response
while (!feof($socket)) {
$result = $result . fgets($socket);
} // while ->> the processing hang-up in this while loop if i send query to timecard table
}//function
}//class
Apr 22 '11 #1
1 1754
does the datatype of the fields affect this?
Apr 22 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mark | last post by:
From VB.Net, I want to open an Access database and run VBA module that resides in the Access database. .Net gives me the error message that Access can't find the VBA Module. 'StartCode Dim...
10
by: vvenk | last post by:
Hello: When I tried to use an Access database, I get the following exception: Server Error in '/WebGrid' Application....
2
by: Enska | last post by:
I have problems connecting my access database I get information .. I cant use my database and I'm administrator on my computer so permission shutnot bee problem, but I dont know Where is the...
0
by: micky | last post by:
=========================================================== Cannot open user default database. Login failed. Login failed for user 'NT AUTHORITY\SYSTEM'....
4
by: vbie | last post by:
For some reason, I cannot open an Access report in "design" mode anymore. This didn't happen before. However, I can open the design mode of the form, query, table in the same database. Please...
9
by: Matt | last post by:
How would I do this ... I want to set the Windows Scheduler to run the ..bat file which will open an access database at like 2 in the AM. What code do I need in the .bat file.
2
by: sqlgirl | last post by:
Hi, We have 2 servers. Server1 is a 2000 box, with SP3 (yes I know it is not up to date). Server2 is a 2005 box, SP2. I set up Server1 (2000) to have a linked server to Server2 (2005). The...
3
by: ConfusedMay | last post by:
Hi, I've created an access 2003 database that has a form with button called "open complaint database." This complaint database is also in access 2003. Here is my code to open the complaint...
0
by: Chuck.Dieterle | last post by:
I have a very frustrating problem. I have a situation that works fine on some computers, but not on others. I have SQL Server Express 2005 and Access 2003 loaded on 4 computers. I have set up a...
14
by: SimeonD | last post by:
Hi I have an access database called Sales.Mdb In vb.net 2005, I'd like to open it. Which I can do. What I can't figure out is how to figure out if Sales.Mdb is open already. If so, I want to open...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.