由买买提看人间百态

topics

全部话题 - 话题: mydb
1 (共1页)
d**t
发帖数: 14
1
Hi,
When I use the follow statement in Visual Basic, the error message said it is
User-defined datatype. I don't know how to make them work. :-(
dim mydb as database
dim myTb as recordset
dim myWs as workspace
Could anybody give me any hints?
Thank you very much!
dgyt
m**********l
发帖数: 10
2
来自主题: GeoSpace版 - Problem opening KML file in Google Earth
I am using Microsoft Access to generate a KML file.
Here is my code:
Option Compare Database
Private Sub Command_Click()
DoCmd.OpenQuery "Test1"
'Export data to text file
Dim MyDB As Database
Dim MyRS As Recordset
Dim fld As Field
Dim strText As String
Dim MyTableName As String
Dim QryOrTblDef As String
QryOrTblDef = "Test1"
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset(QryOrTblDef)
Open "I:\ConnieMa\test.kml" For Output Shared As #1
Print #1, ""
Pr
d***a
发帖数: 316
3
来自主题: Apple版 - mac os x 10.6 下 使用mySQL 一问
用 Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive 安装了 mySQL cluster,
在 terminal 里运行 mysql 后,
输入 create database mydb,
提示 Access denied for user ''@'localhost' to database 'mydb'
是怎么回事,如何解决?谢谢.
s**u
发帖数: 17
4
来自主题: Database版 - Help on JDBC:ODBC SOS

I set up the data source with "ODBC datasource administrator". I added a MS
Access driver, setting as following:
DRIVER={Microsoft Access Driver (*.mdb)}
Server=MyServer
database=mydb
then I selected the file mymd.mdb to link to the datasource
source file named mydb.dsn was constructed by computer.
there must be something wrong, but i just don't know it
v**t
发帖数: 25
5
我在DB2 server 里设置通信的TCP/IP的端口为9999。从别的机器用db2客户端连可以连
上。
但如果我在java程序中用jdbc连时就会连不上,就会死掉,也没有报错。
如果我在server上运行java, 用如下语句可以连上:
String url = "jdbc:db2:mydb";
DriverManager.registerDriver(new COM.ibm.db2.jdbc.app.DB2Driver());
Connection con = DriverManager.getConnection(url, "myuser", "mypass");
但如果用一下语句就会死掉,好像在不断的连
String url = "jdbc:db2://serverIP:portnumber/mydb";
DriverManager.registerDriver(new COM.ibm.db2.jdbc.net.DB2Driver());
Connection con = DriverManager.getConnection(url, "myuser", "mypass")
s******e
发帖数: 96
6
来自主题: Database版 - 请教一个MFC database 的问题
VC++,MFC,database 问题
1. Describe CObList, provide a sample that defines a class named MyClass
derived from CObject , then builds a CObList with a few of MyClass objects
in the process heap, then removes your CObjects from the list.
2. Describe try/catch logic and add try/catch logic to the sample in your
sample 1) above
3. Suppose you have an ODBC Data source named MyDB, provide a sample that
opens a CDatabase object using MyDB data source. Build a CString object
containing SQL to insert a rec
d***a
发帖数: 316
7
【 以下文字转载自 Apple 讨论区 】
发信人: dunfa (蹲着发财), 信区: Apple
标 题: mac os x 10.6 下 使用mySQL 一问
发信站: BBS 未名空间站 (Fri Sep 10 18:53:29 2010, 美东)
用 Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive 安装了 mySQL cluster,
在 terminal 里运行 mysql 后,
输入 create database mydb,
提示 Access denied for user ''@'localhost' to database 'mydb'
是怎么回事,如何解决?谢谢.
w*s
发帖数: 7227
8
ok, i used vs 2012 ultimate, not express version, it's getting better.
1. i have a existing c# project
2. connection to exiting mssql Mydb.mdf from the top steps i posted above.
now in my main.cs i try to do a test by adding 1 line,
MydbEntities mydbEntities = new MydbEntities();
my db file is Mydb.mdf
during build it says "MydbEntities" could not be found.
what should i do from here ?
thanks for helping a dummy !
v**t
发帖数: 25
9
【 以下文字转载自 Database 讨论区 】
【 原文由 vert 所发表 】
我在DB2 server 里设置通信的TCP/IP的端口为9999。从别的机器用db2客户端连可以连
上。
但如果我在java程序中用jdbc连时就会连不上,就会死掉,也没有报错。
如果我在server上运行java, 用如下语句可以连上:
String url = "jdbc:db2:mydb";
DriverManager.registerDriver(new COM.ibm.db2.jdbc.app.DB2Driver());
Connection con = DriverManager.getConnection(url, "myuser", "mypass");
但如果用一下语句就会死掉,好像在不断的连
String url = "jdbc:db2://serverIP:portnumber/mydb";
DriverManager.registerDriver(new COM.ibm.db2.jdbc.net.DB2Driver());
Connection con = DriverMana
d***a
发帖数: 316
10
【 以下文字转载自 Apple 讨论区 】
发信人: dunfa (蹲着发财), 信区: Apple
标 题: mac os x 10.6 下 使用mySQL 一问
发信站: BBS 未名空间站 (Fri Sep 10 18:53:29 2010, 美东)
用 Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive 安装了 mySQL cluster,
在 terminal 里运行 mysql 后,
输入 create database mydb,
提示 Access denied for user ''@'localhost' to database 'mydb'
是怎么回事,如何解决?谢谢.
d***a
发帖数: 316
11
【 以下文字转载自 Apple 讨论区 】
发信人: dunfa (蹲着发财), 信区: Apple
标 题: mac os x 10.6 下 使用mySQL 一问
发信站: BBS 未名空间站 (Fri Sep 10 18:53:29 2010, 美东)
用 Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive 安装了 mySQL cluster,
在 terminal 里运行 mysql 后,
输入 create database mydb,
提示 Access denied for user ''@'localhost' to database 'mydb'
是怎么回事,如何解决?谢谢.
i**o
发帖数: 9
12
Sorry for writing in English - I can't type Chinese font in company PC.
I was trying to access microsoft SQL server using SAS oledb engine. The SAS
statement I use was "libname mydb oledb;". After running the statement, I
can see that a library 'mydb' was created in the library folder. However
that library folder was empty in the explorer window. I can still pull out
data in SAS since I know the name of the tables from microsoft SQL
management studio.
Can somebody advise me how I can directly se... 阅读全帖
x*******3
发帖数: 8342
13

GRANT SELECT,create,alter,update,index,execute,drop,delete, INSERT ON mydb.*
TO 'someuser'@'somehost';
http://dev.mysql.com/doc/refman/5.1/en/grant.html
大包子,谢谢
O******e
发帖数: 734
14
来自主题: EnglishChat版 - 将要发生
The prospect of a delicious meal:
made mydb and companion slobber over a computer keyboard and mouse,
putting them in imminent danger of being zapped;
made newcastle have nasty thoughts over a puddle of drool,
bringing imminent fear of what thoughts he might derive from other
fluids,
made stud drip and some unknown person swallow,
causing imminent injustice due to misunderstanding;
made netghost ...
I can't think of anything to say about the good righteous netghost;
and
s**u
发帖数: 17
15
来自主题: Database版 - Help on JDBC:ODBC SOS
I am trying to connect to access database through JDBC:ODBC in a java
programm
I tried to connect to the following url:
JDBC:ODBC:MyServer;database=mydb.mdb
and establish the access file with corresponding server and filename.
but when I run the program, it keep on telling me the following:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not
fou
nd and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:3661)
at sun.jd
b******u
发帖数: 676
16
来自主题: Database版 - DSN-less connection to SQL server
still old question:
I have a SQL server db and some Access front-end reports. I will have multiple
users that need to use the Access reports. I don't want to set system DSN for
everyone of them. because that would make it hard for me to modify my tables
since every time I would need to refresh the linked table for every computer.
So, I am trying to write a DSNless connection:
strCnct = "ODBC; DRIVER=SQL
server;SERVER=myServer;DATABASE=myDB;UID=myUser;PWD=myPWD"

DoCmd.TransferDatabase acLink,
D****N
发帖数: 430
17
来自主题: Database版 - DSN-less connection to SQL server
Try distributing it with a file dsn.
[ODBC]
DRIVER=SQL Server
UID=myUser
PWD=myPWD
Trusted_Connection=NO
DATABASE=myDB
APP=MicrosoftAccess
SERVER=myServer
It'd still be an ODBC datasource but doesn't need setting up..
c**t
发帖数: 2744
18
来自主题: Database版 - Cannot connect to the mysql server insid
Starting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2004-10-27 20:12 CDT
Interesting ports on localhost.localdomain (127.0.0.1):
(The 1648 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
3306/tcp open mysql
my $dbh = DBI->connect("DBI:mysql:database=mydb;
host=192.168.0.10;port=3306",
"root", "",
{'RaiseError' => 1});
a*******t
发帖数: 891
19
来自主题: Database版 - SQL 2005 Replication problem
SQL 2005, servers are on different domains
I am having an issue with Distrubutor to Subscriber connection:
Error messages:
The process could not connect to Subscriber 'myDB'. (Source: MSSQL_REPL,
Error number: MSSQL_REPL0)
Named Pipes Provider: Could not open a connection to SQL Server [53]. (
Source: MSSQLServer, Error number: 53)
An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the defaul
w*s
发帖数: 7227
20
right now my query in c# looks like this,
Table1Entry bMfi = MyDB.Table1.Single(x => x.Name == "abc");
Table1 is like this {Name, field1, field2}.
now i break Table1 into 2 tables,
Table0 has {id, Name};
Table1 has {id, field1, field2}.
What's the easiest way to do a query based on Name now ?
m*****k
发帖数: 731
21
【 以下文字转载自 Working 讨论区 】
发信人: madmonk (madmonk), 信区: Working
标 题: 你们的应用是如何存储数据库密码的
发信站: BBS 未名空间站 (Fri Sep 4 09:58:56 2009, 美东)
你们的应用是如何存储数据库密码的。不会是像如下hardcode在程序里吧?
Class.forName(“oracle.jdbc.driver.OracleDriver”);
String url = jdbc:oracle:thin:@hostname:1526:myDB;
Connection myConnection = DriverManager.getConnection(url, “username”, “
password”);
d******y
发帖数: 244
22
I learn from a tutorial. I try run the example. errors happen.
something about session and hibernate.cfg.xml.
Here are files.
package roseindia.tutorial.hibernate;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
/**
* @author Deepak Kumar
*
* http://www.roseindia.net
* Hibernate example to inset data into Contact table
*/
public class FirstExample {
public static void main(String[] args) {
Session session = null;
try{
// This ste... 阅读全帖
d****i
发帖数: 4809
23
来自主题: Java版 - Spring例子求解释
openshift没用过,你如果用spring jdbc的话,应该把dataSource设置成postgresql,
比如





d****i
发帖数: 4809
24
我也没搞过那些ORM,hibernate/JPA等等都是ORM,就是把数据库里面的relational
data变成你的Java里面的对象。我直接用Spring JDBC而没用ORM,已经可以满足我的需
求,觉得还不错。那个beans.xml一般是你自己创建的,用来定义Spring bean。比如你
这个要接mysql的话(假设在同一host上),大抵是这样的:




阅读全帖
w*s
发帖数: 7227
25
来自主题: Programming版 - 请教一下:Javascript callback not working
打开页面localhost:8080/db1, 页面停滞不动。
server端打印出step 1, step 2, 但没有step 3.
请问为什么?谢谢!
主程序main.js
const express = require('express')
const app = express()
const port = 8080
var db1 = require("./db.js");
app.get('/', (request, response) => {
response.send('Hello from Express!')
})
app.get('/db1', (request, response) => {
var q1 = db1.query1(function(){
console.log("step 3: " + q1);
response.send('Hello from db1! ' + q1);
});
})
app.listen(port, (err) => {
if (err) {
return ... 阅读全帖
w*s
发帖数: 7227
26
i have a sqlite3 nested query case. Was hoping to push each query result to
a json array and return it back. But always get "Error: SQLITE_MISUSE:
Database handle is closed" for the 2nd select call. Seems the db.close()
gets called before the 2nd query.
Why is this, i thought serialize can take care of this. How to fix it please
?
var getMyDbInfo = function(callback) {
var db = new sqlite3.Database("MyDB.sqlite3");
db.serialize(function() {
var myJsonObj = {};
db.each("se... 阅读全帖
a9
发帖数: 21638
27
试试这样?
const db = new sqlite3.Database("MyDB.sqlite3");
db.all("select * from table1", rows => {
db.serialize(() => {
for(let i = 0; i < rows.length; i++) {
// get doorId
db.all('select * from table2 where ID=?', doorId, table2Rows =>
{
myJsonObj.data.push(myJsonElem);
})
}
db.close();
})
})
w*s
发帖数: 7227
28
i have a sqlite3 nested query case. Was hoping to push each query result to
a json array and return it back. But always get "Error: SQLITE_MISUSE:
Database handle is closed" for the 2nd select call. Seems the db.close()
gets called before the 2nd query.
Why is this, i thought serialize can take care of this. How to fix it please
?
var getMyDbInfo = function(callback) {
var db = new sqlite3.Database("MyDB.sqlite3");
db.serialize(function() {
var myJsonObj = {};
db.each("se... 阅读全帖
a9
发帖数: 21638
29
试试这样?
const db = new sqlite3.Database("MyDB.sqlite3");
db.all("select * from table1", rows => {
db.serialize(() => {
for(let i = 0; i < rows.length; i++) {
// get doorId
db.all('select * from table2 where ID=?', doorId, table2Rows =>
{
myJsonObj.data.push(myJsonElem);
})
}
db.close();
})
})
m*****6
发帖数: 36
30
来自主题: Statistics版 - 新手请教 SAS Oracle 连接问题 (转载)
【 以下文字转载自 Quant 讨论区 】
发信人: mitbbs6 (Peter), 信区: Quant
标 题: 新手请教 SAS Oracle 连接问题
发信站: BBS 未名空间站 (Tue Jul 21 23:10:13 2015, 美东)
libname oralib oracle path=mydb user=user123 password=mypass schema=myschema;
proc sql;
select *
from oralib.mytable;
quit;
今天新换了机器 ,run以上code的时候不work了,没法连接oracle。
ERROR:The Oracle engine cannot be found.
ERROR: Error in the LIBNAME statement.
大家知不知道是怎么回事, 是不是 oracle client没有装好啊 ?
多谢
1 (共1页)