Home > database >  Within the local area network (LAN), the problems when using the image type
Within the local area network (LAN), the problems when using the image type

Time:09-24

Pb8.0 servername=can be set by name or IP address, from the client to access the database, the question now is if you use the name of the machine, such as server (server name), to access the image type very fast, usually 1 seconds can retrieve the photos, but the use of IP address (such as 192.168.1.100), retrieve the photos to 12 seconds, which player has solved the problem, please guide
(show pictures: selectblob data into: tmp_pic from PIC where id=1;
Pic_1. Setpicture (tmp_pic))

CodePudding user response:

Also, in the name of the machine, open the login interface also significantly faster and with IP address, where does the server have set wrong, or the operation of the lack of pb files?

CodePudding user response:

Usually is to use the IP address is faster than in the name of the machine

You this is special

CodePudding user response:

Generally in the program initialization, ready to connect to the database, exit the program, disconnect from the database, such a long connection, just slow in the process of initialization program, the program run, is unlikely to feel slow, you are in the query Image Image, you don't have to do to connect to the database, the direct use of connection for the query

CodePudding user response:

Haven't met you
For the top

CodePudding user response:

# 3 floor, selectblob can under the way of disconnect database query, I think impassability, and is also not including selectblob login window, two differential speed a lot, I feel a little bit different
4th floor, usually is to use the IP address is faster than in the name of the machine, I have made two server, an xp, a winserver2003, are all the same problem, have you ever tried?

CodePudding user response:

Should be IP is faster than the domain name, little step analysis, this problem has nothing to do with these two things, you should be other reasons, look at your other parameters in the connection string

CodePudding user response:

The sqlca. DBMS="MSS Microsoft SQL Server 6. X"
The sqlca. Database=as_db_name
The sqlca. Servername=profilestring (gs_ini, "Database", "servername", "")
The sqlca. Logid=profilestring (gs_ini, "Database", "logid", "sa")
The sqlca. Logpass=profilestring (gs_ini, "Database", "logpass", "")
The sqlca. The autocommit=false
The sqlca. Dbparm="CommitOnDisconnect='No'"
This is to connect to the database

CodePudding user response:

reference 5 floor hzly001 reply:
# 3 floor, selectblob can under the way of disconnect database query, I think impassability, and is also not including selectblob login window, two differential speed a lot, I feel a little bit different
4th floor, usually is to use the IP address is faster than in the name of the machine, I have made two server, an xp, a winserver2003, are all the same problem, have you ever tried?


I mean, when I was in the program initialization completes the database connection work, so when querying data, don't have to make a connection

CodePudding user response:

Are generally at the start of the prepared connection, namely login interface appeared before the connection is good, that is connected with the name of the machine by IP significantly slower (because of login interface pops up how quickly time has obvious) : this is the problem to be solved; Second, not to connect to the database when other queries, namely selectblob problem, I used the sqlca. To judge whether the sqlcode cause of query time slowly
The Usage
An error occurs if the SELECTBLOB statement returns more than one row.
The Error handling for It is good practice to test the success/failure code after executing the an SELECTBLOB statement. To make sure the update affected at further one row, check the SQLNRows property of the SQLCA or the transaction object. The SQLCode or SQLDBCode property will not indicate the success or failure of the SELECTBLOB statement.
  • Related