C# version

Apr 20, 2010 at 2:44 PM
Edited Apr 20, 2010 at 2:45 PM
HERE'S MY CODE : using System; using System.Data; using System.Data.Odbc; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using Spss; using System.IO; namespace MYSQL2SPSS { class Program { public static void Main(string[] args) { SpssDataDocument doc = SpssDataDocument.Create("TEST1.sav"); SpssStringVariable strvar = new SpssStringVariable(); SpssNumericVariable numvar = new SpssNumericVariable(); strvar.Name = "Jeff"; strvar.Label="jeff's label"; numvar.Name = "bilang"; numvar.Label="bilang label"; doc.Variables.Add(strvar); doc.Variables.Add(numvar); doc.CommitDictionary(); // TODO: Implement Functionality Here Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } } Im encountering this error : Spss.SpssException: SPSS function spssOpenWrite returned error code SPSS_INVALID_FILE at Spss.SpssException.ThrowOnFailure at Spss.SpssDataDocument..ctor at Spss.SpssDataDocument.Create at