![]() |
![]() |
![]() |
|
1c и firebird | ☑ | ||
---|---|---|---|---|
0
Йожык
01.04.08
✎
15:18
|
Доброго времени суток...
не могу соеденится с базой фаербёрда
С такими же параметрами строки подключения в IB/FB development studio тестируется соединение нормально... Мож у кого нить была такая проблема... Мож в источники данных нужно фаербёрдовский драйвер добавить? |
|||
1
nop
01.04.08
✎
15:18
|
может строчку надо формата 8,3?
|
|||
2
nop
01.04.08
✎
15:19
|
или через Алиас
|
|||
3
Йожык
01.04.08
✎
15:21
|
(2) это как?
посмотрел тут: Чтение из Firebird... вроде сделал также... хз чего не так... |
|||
4
nop
01.04.08
✎
15:22
|
c:\base\s2006.fdb
|
|||
5
Йожык
01.04.08
✎
15:30
|
(4) типа в кавычках нуно... нее.. сделал так:
не катит.... |
|||
6
nop
01.04.08
✎
15:39
|
(5) може сервер огнептицы не запущен?
|
|||
7
Йожык
01.04.08
✎
15:41
|
(6) запущен... вот я думаю... доустанавливать какие-нить драйвера для ado надо или нет...
|
|||
8
nop
01.04.08
✎
15:42
|
(7) да ну не надо вроде
|
|||
9
nop
01.04.08
✎
15:44
|
This is important so I will dig into this topic a little deeper. A good understanding will save you a lot of headaches.
The connection string for a database is assembled of these parts: [{Database Server Name} [/{Port Number or Service Name}] ":"] {Database Filename} Database Server Name This is the (DNS) name of the database server or its IP address. For the local computer, the server name is always "localhost". You can leave the server name out of the string to access a local file using the local protocol. Port Number or Service Name This is optional and we will not discuss this further here A Colon Yes, a colon character. This is important because it tells Firebird to use TCP/IP as the access protocol. You can also use NetBEUI which has a different syntax then. But because TCP/IP is the norm today, we won't dig any further into NetBEUI here. Database Filename This is the name of the database file. A Firebird database usually consists of exactly one file with a ".fdb" extension. The Database Name is the fully qualified path and filename of this file. NOTE: A Firebird server will only access files on its local filesystem. So you cannot access a file that's on a remote network drive. IMPORTANT: The database name is the path and filename of the .fdb file from the perspective of the Firebird server machine. So even if your database file resides in a directory, which is shared on the network (which is a bad idea, BTW), what the server needs is the pathname as viewed from its own machine. Aliases: In the aliases.conf file of your Firebird folder, you can define aliases so you don't need to specify the full path and filename any more. This is convenient and more secure because the folder structure of the server is not exposed to clients. Examples 1) Database is C:\DB\Employee.fdb on the local machine. Server string: localhost:c:\db\employee.fdb Connection string for local protocol: c:\db\employee.fdb 2) Database is C:\DB\Employee.fdb on server Elvis. Elvis has a file share named DB on its C:\DB folder, and this share is mounted as network K: on every client machine so everyone can access the database file as K:\Employee.fdb. This doesn't matter as we want to access the file using the Firebird server. So the connection string is: elvis:c:\db\employee.fdb 3) Database is on /db/firebird/employee.fdb on Linux server Presley. Client machine is a Windows machine. This doesn't matter because the database name is always given from the server's perspective. So the connection string is: presley:/db/firebird/employee.fdb 4) There is an alias defined on Elvis from example 2. The alias is named employee. So the connection string is: elvis:employee http://www.destructor.de/firebird/fbdelphi/index.htm |
|||
10
Восточный Парень
01.04.08
✎
15:47
|
К интербейсу я так коннектился
ОДБЦ = СоздатьОбъект("ADODB.Connection"); СтрокаПодключения = "Provider=LCPI.IBProvider.1; |Data Source=localhost:E:\LeftBase\Inter\INSPEK.GDB; |auto_commit=True; |ctype=none; |User Id=SYSDBA; |Password=masterkey"; ОДБЦ.Open(СтрокаПодключения); Правда там еще ДЛЛ-ку подменял на специальную. |
|||
11
mrkorn
01.04.08
✎
16:09
|
напрямую
но в алиасах firebird прописана эта база ConnectionString = "driver={Firebird/Interbase(r) driver}; server="+СокрЛП(servername)+"; uid="+СокрЛП(DBUser)+"; pwd="+СокрЛП(DBPaswd)+"; database="+СокрЛП(DBNAME)+"; CHARSET=win1251;DIALECT=3"; через дсн ConnectionString="Provider=MSDASQL.1;Persist Security Info=False;User ID=SYSDBA;DSN="+СокрЛП(UDLLINK)+""; библиотека стадндартная фаербердовсая |
|||
12
romix
модератор
01.04.08
✎
16:20
|
||||
13
Йожык
01.04.08
✎
16:24
|
(12) неужто без ВК никак?
|
|||
14
Йожык
01.04.08
✎
16:26
|
в источниках данных кстати этот драйвер должен быть? наверно должен, но его нет, значит нужно доустанавливать
|
|||
15
Йожык
01.04.08
✎
16:27
|
(11) кстати... "DBNAME" - это путь к базе, или название?
|
|||
16
leshikkam
01.04.08
✎
16:32
|
||||
17
leshikkam
01.04.08
✎
16:35
|
||||
18
Йожык
01.04.08
✎
16:49
|
спасибо всем!!!!!!!!!! миста всегда спасает)))
отдельное (11) помогло |
|||
19
mrkorn
01.04.08
✎
16:53
|
(15) название, как в алиасе
|
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |