把引号去掉了,再次运行时又出现:不支持关键字: “database”。 是指common层里的代码吗? using System; using System.Collections.Generic; using System.Linq; using System.Text;namespace Common { public class Class1 { //cn public const String ConnectString = "server=localhost;database=xBlog;uid=adotest;password=adotest"; //Oracle public const String Oracle_getUser = "select *from Users"; //table public const String table_Users = "Users"; //storedprocedure } }
Oracle的连接字符串好象是用Data Source而不是Database吧
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;Data Source=myOracle;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;
是指common层里的代码吗?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace Common
{
public class Class1
{
//cn
public const String ConnectString = "server=localhost;database=xBlog;uid=adotest;password=adotest"; //Oracle
public const String Oracle_getUser = "select *from Users"; //table
public const String table_Users = "Users"; //storedprocedure
}
}