i am getting an error while creating table at run time in c# code,it says,
Format of the initialization string does not conform to specification starting at index 22.
解决方案You can create DB script and execute using .NET code as below:
Process scriptProc = new Process();
scriptProc.StartInfo.FileName = @"cscript";
scriptProc.StartInfo.Arguments ="//B //Nologo c:\scripts\test.vbs";
scriptProc.Start();
scriptProc.WaitForExit();
scriptProc.Close();
connect to mysql
Create your database
CREATE DATABASE IF NOT EXISTS databasename
now create ur table
CREATE TABLE IF NOT EXISTS `tblmasters` (
`uID` int(11) NOT NULL default ''0'',
`cData` varchar(75) NOT NULL default '''',
`cDescription` varchar(250) NOT NULL default '' '',
`defaultV` varchar(5) NOT NULL default ''Y'',
`cAbbrev` varchar(25) NOT NULL default '''',
`cType` varchar(75) NOT NULL default '''')
It sounds to me like you have a malformed connection string. Check your connection string for the provider you are using /mysql