随笔分类 -  SQL Server

摘要:找不到存储过程'dbo.aspnet_CheckSchemaVersion'导航到目录C:\Windows\Microsoft.NET\Framework\v4.0.30319,执行aspnet_regsql.exe,一定要选对数据库(跟webconfig中connectionString中保持一致) 阅读全文
posted @ 2013-07-27 16:44 勇仔X 阅读(752) 评论(0) 推荐(0)
摘要:SqlHelper.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using System.Data.SqlClient;using System.Data;namespace WpfApplication1.DAL{ static class SqlHelper { public static readonly string connstr = ConfigurationManager.Con... 阅读全文
posted @ 2013-06-13 10:41 勇仔X 阅读(353) 评论(0) 推荐(0)
摘要:下面的代码示例演示 GetRolesForUser 方法的示例实现public override string[] GetRolesForUser(string username){ if (username == null || username == "") throw new ProviderException("User name cannot be empty or null."); string tmpRoleNames = ""; OdbcConnection conn = new OdbcConnection(conn 阅读全文
posted @ 2013-06-06 18:27 勇仔X 阅读(196) 评论(0) 推荐(0)