Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

达梦数据库连接字符串好像有问题,不能指定库名 #1915

Open
manasheep opened this issue Nov 7, 2024 · 7 comments
Open

Comments

@manasheep
Copy link

问题描述及重现代码:

// c# code
@"server=192.168.11.165;port=5236;user=sysdba;password=12345678;database=YSZD;poolsize=5"

这里我是指定数据库为YSZD的,但实际执行时根本不会产生相关SQL代码,所有执行目标都是SYSDBA库

数据库版本

安装的Nuget包

.net framework/. net core? 及具体版本

@2881099
Copy link
Collaborator

2881099 commented Nov 7, 2024

是的,和oracle一样,用Table Name 特性指定库名。

@JavaScript-zt
Copy link

问题解决了吗?

@2881099
Copy link
Collaborator

2881099 commented Nov 21, 2024

server=192.168.11.165;port=5236;user=sysdba;password=12345678;database=sysdba;poolsize=5

只要指定 userid 即可,注意是 codefirst 模式才有此限制。

@JavaScript-zt
Copy link

server=192.168.11.165;port=5236;user=sysdba;password=12345678;database=sysdba;poolsize=5

只要指定 userid 即可,注意是 codefirst 模式才有此限制。

userid SYSDBA 查不了自定义的数据库啊,要怎么操作

@2881099
Copy link
Collaborator

2881099 commented Nov 21, 2024

[Table(Name="xxx.name")]

@JavaScript-zt
Copy link

连接字符串上有数据库名称,为啥不从连接字符串上提取数据库名称,还要强迫开发在代码里面硬编码写死数据库名称

@9a6c
Copy link

9a6c commented Dec 4, 2024

只想指定模式不指定表名,要如何用Table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants