Jump to content
Xtreme .Net Talk

Joe Mamma

Avatar/Signature
  • Posts

    1093
  • Joined

  • Last visited

Everything posted by Joe Mamma

  1. isn'tdim i as picturebox = new picturebox the equivalent of [indent] dim i as picturebox i = new picturebox [/indent] I don't think you can do dim i as new picturebox in vb.not, can you?
  2. Vb.Net=vb.Not Vb6=vb.sux :) and vb.sux is an awful development environment!
  3. from way back . . . (man Ive learned alot snce then) add this class to your app (code follows, post back if I messed something up in the VB translation from C#). usage: ______________________________________________ Public Shared Function ObjTec.InputForm.PromptString(ByVal args As ObjTec.PromptFormArgs) As String parameters: args - instance of ObjTec.PromptFormArgs (see below) return: on 'OK' - the User Specified Text, on 'Cancel' - nothing [font=Microsoft Sans Serif]dim s as string [/font][font=Microsoft Sans Serif]= ObjTec.InputForm.PromptString(new ObjTec.PromptFormArgs("This is The Title", "This is the Prompt", "This is Initial Value") [/font] ______________________________________________ Public Shared Function ObjTec.InputForm.PromptQuery(ByVal args As ObjTec.PromptFormArgs, ByRef result As String) As Boolean parameters: args - instance of ObjTec.PromptFormArgs (see below)result [out] - null on user cancel else the input value return: on 'OK'- true on 'Cancel' - false ______________________________________________ class ObjTec.PromptFormArgs constructor [/font][font=Microsoft Sans Serif]Public Sub New(ByVal title As String, ByVal prompt As String, ByVal defaultValue As String)[/font][font=Microsoft Sans Serif]property [/font][font=Microsoft Sans Serif]shared readonly ObjTec.PromptFormArgs.Empty [/font][font=Microsoft Sans Serif][font=Microsoft Sans Serif] defaults the form to:[/font] Title = Application.ProductName prompt = "Value Required" Default = "[not set]'"[/font][font=Microsoft Sans Serif][font=Microsoft Sans Serif]dim s as string [/font][font=Microsoft Sans Serif]= ObjTec.InputForm.PromptString(ObjTec.PromptFormArgs.Empty) [/font][font=Microsoft Sans Serif] [/font] _____________________________________________ example: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click [indent]Dim s1 As String = ObjTec.InputForm.PromptString(New ObjTec.PromptFormArgs("A Value Needed", "Enter any Value", "Default")) Dim s2 As String If ObjTec.InputForm.PromptQuery(ObjTec.PromptFormArgs.Empty, s2) Then[indent]MessageBox.Show(s2) [/indent] ElseIf Not (s1 Is Nothing) Then [indent]MessageBox.Show(s1) [/indent] Else [indent]MessageBox.Show("User Cancelled") [/indent] End If [/indent]End SubThe Class Code - [indent]Imports System Imports System.Drawing Imports System.Collections Imports System.ComponentModel Imports System.Windows.Forms Namespace ObjTec Public Class InputForm[indent] Inherits System.Windows.Forms.Form Private WithEvents okButton As System.Windows.Forms.Button [/indent] [indent]Private WithEvents cancelBtn As System.Windows.Forms.Button Friend WithEvents label1 As System.Windows.Forms.Label Friend WithEvents textBox1 As System.Windows.Forms.TextBox Private components As System.ComponentModel.Container = Nothing Private Sub New()[indent]InitializeComponent() [/indent] End Sub Protected Overloads Sub Dispose(ByVal disposing As Boolean) [indent]If disposing Then[indent]If Not (components Is Nothing) Then[indent]components.Dispose() [/indent] End If [/indent]End If MyBase.Dispose(disposing) [/indent]End Sub Private Sub InitializeComponent() [indent]Me.okButton = New System.Windows.Forms.Button Me.cancelBtn = New System.Windows.Forms.Button Me.label1 = New System.Windows.Forms.Label Me.textBox1 = New System.Windows.Forms.TextBox Me.SuspendLayout() Me.okButton.DialogResult = System.Windows.Forms.DialogResult.OK Me.okButton.Enabled = False Me.okButton.Location = New System.Drawing.Point(96, 56) Me.okButton.Name = "okButton" Me.okButton.TabIndex = 0 Me.okButton.Text = "&OK" Me.cancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.cancelBtn.Location = New System.Drawing.Point(200, 56) Me.cancelBtn.Name = "cancelBtn" Me.cancelBtn.TabIndex = 1 Me.cancelBtn.Text = "&Cancel" Me.label1.Location = New System.Drawing.Point(32, 8) Me.label1.Name = "label1" Me.label1.Size = New System.Drawing.Size(288, 16) Me.label1.TabIndex = 2 Me.label1.Text = "label1" Me.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.textBox1.Location = New System.Drawing.Point(32, 32) Me.textBox1.Name = "textBox1" Me.textBox1.Size = New System.Drawing.Size(296, 20) Me.textBox1.TabIndex = 3 Me.textBox1.Text = "textBox1" Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(352, 93) Me.Controls.Add(Me.textBox1) Me.Controls.Add(Me.label1) Me.Controls.Add(Me.cancelBtn) Me.Controls.Add(Me.okButton) Me.Name = "InputForm" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "InputForm" Me.ResumeLayout(False) [/indent] End Sub Private Sub SetFromArgs(ByVal args As PromptFormArgs) [indent]Me.Text = args._title Me.label1.Text = args._prompt Me.textBox1.Text = args._default [/indent] End Sub Public Shared Function PromptQuery(ByVal args As PromptFormArgs, ByRef result As String) As Boolean [indent]Dim frm As New InputForm Try[indent]result = Nothing If args Is Nothing Then[indent]frm.SetFromArgs(New PromptFormArgs) [/indent] Else [indent]frm.SetFromArgs(args) [/indent] End If If frm.ShowDialog() = System.Windows.Forms.DialogResult.OK Then [indent]result = frm.textBox1.Text Return True [/indent] Else [indent]Return False [/indent] End If [/indent]Finally [indent]frm.Dispose() [/indent] End Try [/indent]End Function Public Shared Function PromptString(ByVal args As PromptFormArgs) As String [indent]Dim frm As New InputForm Try[indent]If args Is Nothing Then[indent]frm.SetFromArgs(New PromptFormArgs) [/indent] Else [indent]frm.SetFromArgs(args) [/indent] End If If frm.ShowDialog() = System.Windows.Forms.DialogResult.OK Then [indent]Return frm.textBox1.Text [/indent] Else [indent]Return Nothing[/indent] End If [/indent]Finally [indent]frm.Dispose()[/indent] End Try [/indent]End Function Private Sub textBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles textBox1.TextChanged [indent]okButton.Enabled = textBox1.Text <> ""[/indent] End Sub [/indent]End Class Public Class PromptFormArgs [indent]Friend _title As String = System.Windows.Forms.Application.ProductName Friend _prompt As String = "Value Required" Friend _default As String = "[Not Set]" Friend Sub New() End Sub Public Sub New(ByVal title As String, ByVal prompt As String, ByVal defaultValue As String)[indent]_title = title _prompt = prompt _default = defaultValue [/indent] End Sub Public Shared ReadOnly Property Empty() As PromptFormArgs [indent]Get[indent]Return Nothing [/indent] End Get [/indent]End Property [/indent]End Class End Namespace [/indent] TestDialog.zip
  4. the first handful of properties generated as the code is too long to post. . . using System; namespace Unicode { public sealed class Chars { private Chars(){} static public char None { get { return(char)System.Windows.Forms.Keys.None; } } static public char LButton { get { return(char)System.Windows.Forms.Keys.LButton; } } static public char RButton { get { return(char)System.Windows.Forms.Keys.RButton; } } static public char Cancel { get { return(char)System.Windows.Forms.Keys.Cancel; } } static public char MButton { get { return(char)System.Windows.Forms.Keys.MButton; } } static public char XButton1 { get { return(char)System.Windows.Forms.Keys.XButton1; } } static public char XButton2 { get { return(char)System.Windows.Forms.Keys.XButton2; } } static public char Back { get { return(char)System.Windows.Forms.Keys.Back; } } static public char Tab { get { return(char)System.Windows.Forms.Keys.Tab; } } static public char LineFeed { get { return(char)System.Windows.Forms.Keys.LineFeed; } } static public char Clear { get { return(char)System.Windows.Forms.Keys.Clear; } } static public char Return { get { return(char)System.Windows.Forms.Keys.Return; } } static public char Enter { get { return(char)System.Windows.Forms.Keys.Enter; } } static public char ShiftKey { get { return(char)System.Windows.Forms.Keys.ShiftKey; } } static public char ControlKey { get { return(char)System.Windows.Forms.Keys.ControlKey; } } static public char Menu { get { return(char)System.Windows.Forms.Keys.Menu; } } static public char Pause { get { return(char)System.Windows.Forms.Keys.Pause; } } static public char CapsLock { get { return(char)System.Windows.Forms.Keys.CapsLock; } }
  5. look up "shared methods" in vb help
  6. God, I love this stuff!!!! You may run into some problems with datatype conversions, let me know exactly the problem and it should be very easy to fix. replace the contents of DataSetToJet.cs with this code. Addied method MoveData whic is called in the loop through the datatables immediately after attaching the generated ADOX.Table to the catalog. review the code in MoveData as it calls a method that factories an ADODB.Command note: since the ADODB libraries were already referenced, I am using adodb.command object as the cmd.Execute allows for easy parameterization. using System; using ADOX; using ADODB; using System.Data; using System.Data.OleDb; namespace ADOXJetXML { public class DatasetToJet { static public void CopyDatasetSchemaToJetDB(DataSet ds, string jetFileName) { string connstr = string.Format(@"Data Source=""{0}"";Jet OLEDB:Engine Type=5;"+ @"Provider=""Microsoft.Jet.OLEDB.4.0"";User ID=Admin;", jetFileName); Catalog cat = new CatalogClass(); if (!System.IO.File.Exists(jetFileName)) cat.Create(connstr); else { ADODB.Connection conn = new ConnectionClass(); conn.Open(connstr, "Admin", "",-1); cat.ActiveConnection = conn; } foreach(DataTable table in ds.Tables) { try { cat.Tables.Delete(table.TableName); } catch{} ADOX.Table adoxTab = CopyDataTable(table, cat); cat.Tables.Append(adoxTab); // // NEW METHOD CALL // MoveData(adoxTab, table); } } static private ADOX.Table CopyDataTable(DataTable table, Catalog cat) { ADOX.Table adoxTable = new ADOX.TableClass(); adoxTable.Name = table.TableName; adoxTable.ParentCatalog = cat; foreach(System.Data.DataColumn col in table.Columns) { ADOX.Column adoxCol = new ADOX.ColumnClass(); adoxCol.ParentCatalog = cat; adoxCol.Name = col.ColumnName; adoxCol.Type = TranslateDataTypeToADOXDataType(col.DataType); adoxCol.Attributes = ADOX.ColumnAttributesEnum.adColNullable; if (col.MaxLength >=0 ) adoxCol.DefinedSize = col.MaxLength; adoxTable.Columns.Append(adoxCol, adoxCol.Type, adoxCol.DefinedSize); } return adoxTable; } static private ADOX.DataTypeEnum TranslateDataTypeToADOXDataType(Type type) { string guid = type.GUID.ToString(); ADOX.DataTypeEnum adoxType = guid == typeof(bool).GUID.ToString() ? ADOX.DataTypeEnum.adBoolean : guid == typeof(byte).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedTinyInt: guid == typeof(char).GUID.ToString() ? ADOX.DataTypeEnum.adChar : guid == typeof(DateTime).GUID.ToString() ? ADOX.DataTypeEnum.adDate : guid == typeof(decimal).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(double).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(Int16).GUID.ToString() ? ADOX.DataTypeEnum.adSmallInt : guid == typeof(Int32).GUID.ToString() ? ADOX.DataTypeEnum.adInteger : guid == typeof(Int64).GUID.ToString() ? ADOX.DataTypeEnum.adBigInt : guid == typeof(SByte).GUID.ToString() ? ADOX.DataTypeEnum.adTinyInt : guid == typeof(Single).GUID.ToString() ? ADOX.DataTypeEnum.adSingle : guid == typeof(string).GUID.ToString() ? ADOX.DataTypeEnum.adLongVarWChar : guid == typeof(TimeSpan).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(UInt16).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedSmallInt : guid == typeof(UInt32).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedInt : guid == typeof(UInt64).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedBigInt : ADOX.DataTypeEnum.adVarBinary; return adoxType; } // // NEW METHOD // private static ADODB.Command ADOXTableInsertCommand(ADOX.Table adoxTab) { ADODB.Command result = new ADODB.CommandClass(); object conn = adoxTab.ParentCatalog.ActiveConnection; result.ActiveConnection = (ConnectionClass) conn; result.CommandText = string.Format("INSERT INTO {0} ({1}) values({2}) " , adoxTab.Name, "{0}", "{1}"); string colNames = string.Empty; string colVals = string.Empty; for (int i = 0; i < adoxTab.Columns.Count; i++) { ADOX.Column adoxCol = adoxTab.Columns[i]; string name = adoxCol.Name; ADOX.DataTypeEnum type = adoxCol.Type; switch ( type ) { case ADOX.DataTypeEnum.adVarBinary: break; default: colNames += ( colNames != string.Empty ? "," : "") + name; colVals += (colVals != string.Empty ? "," : "") + "?" ; break; } } result.CommandText = string.Format(result.CommandText, colNames, colVals); return result; } // // NEW METHOD // private static void MoveData(ADOX.Table adoxTab, DataTable aTable) { object i; ADODB.Command cmd = ADOXTableInsertCommand(adoxTab); foreach(DataRow row in aTable.Rows) { object arry = row.ItemArray; cmd.Execute(out i, ref arry, 1); } } } } ADOXJetXML.zip
  7. I am sure the above would be easier and more elegant with CodeDOM, but I have never played with it. . .
  8. probably easier to do with CodeDom, but I have never used it. . . to generate a class with usage: char c = Unicode.Chars.Tab; string c = Unicode.Chars.Tab.ToString(); executing this line: Unicode.GenClass.Chars.GenClass(); on this class: using System; namespace Unicode.GenClass { public sealed class Chars { private Chars() {} static void EnumProperty(string aKey) { object testKey = Enum.Parse(typeof(System.Windows.Forms.Keys), aKey); if ( (Convert.ToInt32(testKey)> UInt16.MaxValue) | Convert.ToInt32(testKey) < 0) return; Console.WriteLine(""); string keyName = aKey; string keytype = string.Format("System.Windows.Forms.Keys.{0}", keyName); Console.WriteLine(string.Format("\t\tstatic public char {0}", keyName)); Console.WriteLine("\t\t{"); Console.WriteLine("\t\t\tget"); Console.WriteLine("\t\t\t{"); Console.WriteLine(string.Format("\t\t\t\t return(char){0};", keytype)); Console.WriteLine("\t\t\t}"); Console.WriteLine("\t\t}"); } public static void GenClass() { Console.WriteLine("using System;"); Console.WriteLine(""); Console.WriteLine("namespace Unicode"); Console.WriteLine("{"); Console.WriteLine("\tpublic sealed class Chars"); Console.WriteLine("\t{"); Console.WriteLine(""); Console.WriteLine("\t\tprivate Chars(){}"); foreach (string akey in Enum.GetNames(typeof(System.Windows.Forms.Keys))) EnumProperty(akey); Console.WriteLine("\t}"); Console.WriteLine("}"); } } } [/CS] genrated the attached source to the console window Unicode.Chars.zip
  9. As I can never remember the codes for keys, I like - (char) Keys.Tab or in either this will work, too: Convert.ToChar(Keys.Tab) Too bad "Keys.Tab.ToString()" doesn't return the tab character, eh? hmmmm. . . . give me a moment. . . .
  10. be sure to get the one I just edited as I removed console I/O I inadvertantly left in for debugging.
  11. debugged. . . note the changes - Strings will be defined as memos, hope thats ok?!? attached cs lib project you can reference. usage: ADOXJetXML.DatasetToJet.CopyDatasetSchemaToJetDB(productDS1, "foobar.mdb"); NB - Deletes the table if it already exists!!!! using System; using ADOX; using ADODB; using System.Data; using System.Data.OleDb; namespace ADOXJetXML { /// <summary> /// Summary description for DatasetToJet. /// </summary> public class DatasetToJet { static public void CopyDatasetSchemaToJetDB(DataSet ds, string jetFileName) { string connstr = string.Format(@"Data Source=""{0}"";Jet OLEDB:Engine Type=5;"+ @"Provider=""Microsoft.Jet.OLEDB.4.0"";User ID=Admin;", jetFileName); Catalog cat = new CatalogClass(); if (!System.IO.File.Exists(jetFileName)) cat.Create(connstr); else { ADODB.Connection conn = new ConnectionClass(); conn.Open(connstr, "Admin", "",-1); cat.ActiveConnection = conn; } foreach(DataTable table in ds.Tables) { try { cat.Tables.Delete(table.TableName); } catch{} ADOX.Table adoxTab = CopyDataTable(table, cat); cat.Tables.Append(adoxTab); } } static private ADOX.Table CopyDataTable(DataTable table, Catalog cat) { ADOX.Table adoxTable = new ADOX.TableClass(); adoxTable.Name = table.TableName; adoxTable.ParentCatalog = cat; foreach(System.Data.DataColumn col in table.Columns) { ADOX.Column adoxCol = new ADOX.ColumnClass(); adoxCol.ParentCatalog = cat; adoxCol.Name = col.ColumnName; adoxCol.Type = TranslateDataTypeToADOXDataType(col.DataType); if (col.MaxLength >=0 ) adoxCol.DefinedSize = col.MaxLength; adoxTable.Columns.Append(adoxCol, adoxCol.Type, adoxCol.DefinedSize); } return adoxTable; } static private ADOX.DataTypeEnum TranslateDataTypeToADOXDataType(Type type) { string guid = type.GUID.ToString(); ADOX.DataTypeEnum adoxType = guid == typeof(bool).GUID.ToString() ? ADOX.DataTypeEnum.adBoolean : guid == typeof(byte).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedTinyInt: guid == typeof(char).GUID.ToString() ? ADOX.DataTypeEnum.adChar : guid == typeof(DateTime).GUID.ToString() ? ADOX.DataTypeEnum.adDate : guid == typeof(decimal).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(double).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(Int16).GUID.ToString() ? ADOX.DataTypeEnum.adSmallInt : guid == typeof(Int32).GUID.ToString() ? ADOX.DataTypeEnum.adInteger : guid == typeof(Int64).GUID.ToString() ? ADOX.DataTypeEnum.adBigInt : guid == typeof(SByte).GUID.ToString() ? ADOX.DataTypeEnum.adTinyInt : guid == typeof(Single).GUID.ToString() ? ADOX.DataTypeEnum.adSingle : guid == typeof(string).GUID.ToString() ? ADOX.DataTypeEnum.adLongVarWChar : guid == typeof(TimeSpan).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(UInt16).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedSmallInt : guid == typeof(UInt32).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedInt : guid == typeof(UInt64).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedBigInt : ADOX.DataTypeEnum.adBinary; return adoxType; } } } ADOXJetXML.zip
  12. "when in doubt. . . right click!!!"
  13. you can compile a c# project, yes??? let me make a library project that you can reference. . . give me a second to debug it to see why it doesn't work as expected.
  14. select s1.* [indent]from student s1 [/indent] inner join ( [indent]select name, count(*) cnt [indent]from (select distinct name, cert from student) temp where cert in ('A', 'B', 'C') group by name having count(*) = 3 [/indent] [/indent]) [indent]s2 on s1.name = s2.name [/indent]
  15. no its not! They had the connections string hardcoded in the app with the password!
  16. or simply: <input type="text" name="myTextBox" /> <input type="button" value="Clear" onClick="javascript:document.all.myTextBox.value=''" />
  17. Imagine the look of suprise of my once prospective, and now current, client when I opened the exe of a competitors app they were using in notepad and did a search on "p a s s w o r d" and got the dbo login credentials to their Security Application database. And then there is the case of another client where I instanced, in Outlook, one of our competitor applications ActiveX data objects they were using and emailed them the connection string with a couple of lines of code.
  18. An end unto himself!!!
  19. just hacked this together . . . no test - but this copies the schema to a Jet Database (creating it if it doent exist) once the schema is copied, moving the data is trivial, isnt it??? usage: ADOXJetXML.DatasetToJet.CopyDatasetSchemaToJetDB(someDataset, someFilePath); NOTE: requires interop of the ADO and ADO extensions Libraries! using ADOX; using ADODB; using System; using System.Data; using System.Data.OleDb; namespace ADOXJetXML { /// <summary> /// Summary description for DatasetToJet. /// </summary> public class DatasetToJet { static public void CopyDatasetSchemaToJetDB(DataSet ds, string jetFileName) { string connstr = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source={0};Jet OLEDB:Engine Type=5;", jetFileName); Catalog cat = new CatalogClass(); if (!System.IO.File.Exists(jetFileName)) cat.Create(connstr); else { cat.ActiveConnection = new ADODB.ConnectionClass(); (cat.ActiveConnection as ADODB.Connection).Open(connstr, "","", -1); } foreach(DataTable table in ds.Tables) cat.Tables.Append(CopyDataTable(table)); } static private ADOX.Table CopyDataTable(DataTable table) { ADOX.Table adoxTable = new ADOX.TableClass(); adoxTable.Name = table.TableName; foreach(System.Data.DataColumn col in table.Columns) adoxTable.Columns.Append( new ADOX.ColumnClass(), TranslateDataTypeToADOXDataType(col.DataType), col.MaxLength); return adoxTable; } static private ADOX.DataTypeEnum TranslateDataTypeToADOXDataType(Type type) { string guid = type.GUID.ToString(); return guid == typeof(bool).GUID.ToString() ? ADOX.DataTypeEnum.adBoolean : guid == typeof(byte).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedTinyInt: guid == typeof(char).GUID.ToString() ? ADOX.DataTypeEnum.adChar : guid == typeof(DateTime).GUID.ToString() ? ADOX.DataTypeEnum.adDate : guid == typeof(decimal).GUID.ToString() ? ADOX.DataTypeEnum.adDecimal : guid == typeof(double).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(Int16).GUID.ToString() ? ADOX.DataTypeEnum.adSmallInt : guid == typeof(Int32).GUID.ToString() ? ADOX.DataTypeEnum.adInteger : guid == typeof(Int64).GUID.ToString() ? ADOX.DataTypeEnum.adBigInt : guid == typeof(SByte).GUID.ToString() ? ADOX.DataTypeEnum.adTinyInt : guid == typeof(Single).GUID.ToString() ? ADOX.DataTypeEnum.adSingle : guid == typeof(string).GUID.ToString() ? ADOX.DataTypeEnum.adVarChar : guid == typeof(TimeSpan).GUID.ToString() ? ADOX.DataTypeEnum.adDouble : guid == typeof(UInt16).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedSmallInt : guid == typeof(UInt32).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedInt : guid == typeof(UInt64).GUID.ToString() ? ADOX.DataTypeEnum.adUnsignedBigInt : ADOX.DataTypeEnum.adBinary; } } }
  20. how much of the schema do you need? just the tabes and columns??? or relations, defaults and constraints, too????
  21. do you have ms access available for interop or only the jet engine?
  22. is it too late to stop payment on his paycheck???? [indent]dim Cmd as new SQLCommand("InsertNewGrant",conn) cmd.CommandType = CommandType.StoredProcedure cmd.Parameters.Add("@GrantNumber", GrantNumber.Text.Trim()) cmd.Parameters.Add("@GrantProjectName", ProjectName.Text.Trim()) cmd.Parameters.Add("@CountryId", Country.SelectedItem.Value) cmd.Parameters.Add("@Description", System.DBNull) cmd.Parameters.Add("@CreateUserId", 0) cmd.Parameters.Add("@UpdateUserId", 0) cmd.Parameters.Add("@ObligationDate", ObligationDate.SelectedDate) cmd.Parameters.Add("@OrigionalExpDate", CurrentExpirationDate.SelectedDate) cmd.Parameters.Add("@CurrentExpDate", CurrentExpirationDate.SelectedDate) cmd.Parameters.Add("@Terminated", 0) cmd.Parameters.Add("@Suspended", 0) cmd.Parameters.Add("@Locked", 0) cmd.Parameters.Add("@LockedByUserId", 0) cmd.Parameters.Add("@ACTNumber", System.DBNull) cmd.Parameters.Add("@GranteeName", GranteeName.Text.Trim()) cmd.Parameters.Add("@GranteeAddress1", AddressLine1.Trim()) cmd.Parameters.Add("@GranteeAddress2", AddressLine2.Trim()) cmd.Parameters.Add("@GranteeAddress3", AddressLine3.Trim()) Cmd.connection.open() Cmd.ExecuteNonQuery() Cmd.connection.close() [/indent]
  23. They didnt get me at the xtremevbtalk forum. . . Be careful about the advice you get there. There is alot of bad info/practice bandied about over there. Their suggested usage of the various vb grids is totally wrong! But then again, vb.sux is so counterintuitive, one can hardly blame them, I guess. oh yeah. . . D@MN VLADIMIR GUERRERO!!! D@MN HIM TO HELL!!!!!!
×
×
  • Create New...