什么是我的数据库的数据源 [英] What is the DataSource Of My DB

查看:129
本文介绍了什么是我的数据库的数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是编码新手...我正在尝试从前端连接数据库...我已经在系统中安装了oracle 11g ...我正在使用此

Hi All,

I am new to coding...I am trying to connect my db from front end...I have installed oracle 11g in my system...I am using this

string constring = "Data Source=?;User Id=database user id;Password=mypaswrd;";
SqlConnection conn = new SqlConnection(constring);
conn.Open();




但是我不知道我的数据源...从哪里可以找到我的数据源...或者我可以在那里使用....或者没有数据源是否可以连接到数据库?..

请帮助...




but I dont know my data source...from where i can find out my data source...or what i can use there....or without datasource whether connecting to db is possible?..

Please help...

推荐答案

看看下面的链接,了解Oracle的连接字符串示例:

连接字符串示例
Take a look at the following link for connection string samples for Oracle :

connection string samples


数据源是我们数据库服务器的地址..

要使用本地数据库,您可以编写本地文件或仅放置.(dot),以编写某些内容...

查看我的连接字符串以进行演示

Datasource is the address of our database server..

for using local database you can write a local or put only .(dot) insted of writing some thing...

look at my connection string for demonstartion

"Data Source=.;Initial Catalog=MyEcommerce;Integrated Security=True"

or 
"Data Source=(local)\SQLEXPRESS;Initial Catalog=MyEcommerce;Integrated Security=True"

or 
"Data Source=Tejas-Laptop\SQLEXPRESS;Initial Catalog=MyEcommerce;Integrated Security=True"


这篇关于什么是我的数据库的数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆