@echo off OSQL -E -i CreateStoredProcedures.sql echo . echo Scripts Created 将文本做成.sql可以吗?
用c#读文件using System;using System.IO;using System.Collections;class Anagrams {public static void Main(String[] args){StreamReader din = File.OpenText ("words.txt");String str;StringTable st = new StringTable(); Console.WriteLine("Reading data and insterting into a StringTable.");while ((str=din.ReadLine()) != null) {st.Add(str);}Console.WriteLine("Printing out the StringTable.");foreach (string s in st){Console.WriteLine (s);}Console.WriteLine ("\r\nPress Return to exit.");Console.Read();}}将文本读出来再用SqlCommand执行就行了。
我用的c#.net, 用sql文件也可以,不过我看文本文件和sql文件只是后缀不同,其他的没有区别啊? to SassyBoy(dp->tdd->xp) 如果只是一句sql SqlCommand 执行我会, 要是很多语句那?
OSQL -E -i CreateStoredProcedures.sql
echo .
echo Scripts Created 将文本做成.sql可以吗?
to SassyBoy(dp->tdd->xp)
如果只是一句sql SqlCommand 执行我会, 要是很多语句那?