Excel+vba insert to ms sql - кодировка русских букв
Формулировка задачи:
пишу инсерт в БД. Данные не переменными привязки, а константой в строку
русские буквы доходят вопросами
явно чего-то не знаю в MS SQL (да практически ничего)
Решение задачи: «Excel+vba insert to ms sql - кодировка русских букв»
textual
Листинг программы
USE [Assets] GO /****** Object: Table [dbo].[scsm_access_groups] Script Date: 11/25/2016 2:03:42 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[scsm_access_groups]( [group_id] [int] IDENTITY(1,1) NOT NULL, [access_group] [varchar](200) NOT NULL, [company_id] [int] NOT NULL, [description] [nvarchar](200) NULL, [GlobalInfSecurity] [int] NOT NULL, [LocalInfSecurity] [int] NOT NULL, [it_service] [varchar](200) NULL, [created_user] [varchar](200) NULL, [created_date] [date] NULL, [change_user] [varchar](200) NULL, [change_date] [date] NULL, [date_from] [date] NULL, [date_to] [date] NULL, CONSTRAINT [pk_access_groups] UNIQUE NONCLUSTERED ( [group_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY], CONSTRAINT [uk_access_groups] UNIQUE NONCLUSTERED ( [access_group] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO ALTER TABLE [dbo].[scsm_access_groups] WITH CHECK ADD CONSTRAINT [fk_scsm_access_groups_company] FOREIGN KEY([company_id]) REFERENCES [dbo].[scsm_company] ([company_id]) ON DELETE CASCADE GO ALTER TABLE [dbo].[scsm_access_groups] CHECK CONSTRAINT [fk_scsm_access_groups_company] GO ALTER TABLE [dbo].[scsm_access_groups] WITH CHECK ADD CHECK (([GlobalInfSecurity]=(1) OR [GlobalInfSecurity]=(0))) GO ALTER TABLE [dbo].[scsm_access_groups] WITH CHECK ADD CHECK (([LocalInfSecurity]=(1) OR [LocalInfSecurity]=(0))) GO
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д