|
I would take that you mean that you have to commit the new columns to the database before you attempt to modify them and make the column nullable.
|
|
|
|
|
hi i have MS VB 2005 EE application ...in my application user can download my application from a website and they can fill out a form and submit the information to my remote server ....
what i need to do is i want the data sending by the users through web will be in encrypted form and data recived in my place is in decrypted form ...
how to acheive help needed>>>>
tHANK YOU FOR IN ADVANCE
|
|
|
|
|
"hi everyone need help" - please read the forum guidelines
harieshkumar.n wrote: what i need to do is i want the data sending by the users through web will be in encrypted form and data recived in my place is in decrypted form ...
Use the System.Cryptography namespace to do this.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
i have searched but i couldnt find a good and understandable example could youplease help me out with some examples
|
|
|
|
|
I have a Parent form with multiples tables.
let's say a group box that display text from table1 and also
I have a comboBox binding to table1 inside this groupbox along with textboxes.
On addnew from the parent table, I want to click on individual AddNew button to load a child form where I can select the one record that I want to show back to the parent table. Hence the selected PK id from table1 will show in the comboBox along with its text.
Can anyone guide me and I will be greatly appreciated..
thanks
|
|
|
|
|
You need to hook a delegate between the child and the parent, so that you can call a method in the child form, and it runs a method in the parent form. There's plenty of articles on delegates around.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
can u point me to some delegate articles since I don't know not much about delegates.
I reformulate my question...
I am using Vb.net and Sql express I have a Parent form with multiples tables for example table1, table2, etc. I have a group box that display textboxes from table1 and along a comboBox binding to table1 datasource. On Bindingaddnewitem on the parent form, I want to click on individual AddNew button to load a child form with table1 records where I can select the one record. I want to show this record back to the parent form. Hence the selected PK id of that particular record from table1 will show back in the comboBox on the parent form along with its text. I hope I make myself clear.. Can anyone give me an idea. if I use combox to select the record from table1, this can be huge. therefore I just want the one record from the child form which can be slected from a search or slelected or new added record. Can anyone guide me and I will be greatly appreciated..
Thanks
|
|
|
|
|
Why could you not just use a getter setter on the child form?
Humble Programmer
|
|
|
|
|
thanks for reply but have no idea what is a getter setter
|
|
|
|
|
You would want something like this on the child form.
Private iIntegerToBeSetGet As Integer = 0
Public Property iIntegerSetterGetter() As Integer
Get
Return iIntegerToBeSetGet
End Get
Set(ByVal value As Integer)
iIntegerToBeSetGet = value
End Set
End Property
and something like this in the parent form.
Dim objMyForm As New Form1
Dim i As Integer = objMyForm.iIntegerSetterGetter()
objMyForm.iIntegerSetterGetter = 12
Just use the value in the combobox that you want to show up on the parent form.
Humble Programmer
|
|
|
|
|
Thanks!
But on the child form, I have a datagridview and a search criteria. I do not have a combobox on the child form because try to avoid a huge list to select from..
I want to either search for a record or add a new record on the child form and then parse it back to the parent form..
Here is the scenario:
New Registration form
AddOffenderbutton will load offenderform (child form)to fill offenderlastname.text, offenderfirstname.text, offenderidentification.text, etc.. on the parent form(Registration form)
Hope I am bit clearer now..
Thanks a lot
|
|
|
|
|
I'm trying to write a utility that can compare a dataset to an existing SQL Server and then make changes to it via SMO
the problem i'm having currently is getting the indexes to be created properly.
dt is a table from the the .xsd dataset
TableToUpdate is the table i'm going to be making changes to.
VerifyTable is an exact copy of the table made at the same time TableToUpdate was created.
Private Function UpdateColumn(ByRef TableToUpdate As Microsoft.SqlServer.Management.Smo.Table, ByVal ColumnToAdd As System.Data.DataColumn, ByVal dt As System.Data.DataTable, ByVal VerifyTable As Microsoft.SqlServer.Management.Smo.Table) As Boolean<br />
Dim UpdateNeeded As Boolean = False<br />
Dim idx As Index<br />
Dim col As Column<br />
col = TableToUpdate.Columns(ColumnToAdd.ColumnName)<br />
<br />
col.Nullable = ColumnToAdd.AllowDBNull<br />
col.DataType = GetTypeOfData(ColumnToAdd)<br />
<br />
If Not ColumnToAdd.DefaultValue.Equals(DBNull.Value) Then<br />
col.AddDefaultConstraint("DF_" & col.Name)<br />
col.DefaultConstraint.Text = ColumnToAdd.DefaultValue.ToString<br />
End If<br />
<br />
col.Identity = ColumnToAdd.AutoIncrement<br />
If col.Identity Then<br />
col.IdentityIncrement = ColumnToAdd.AutoIncrementStep<br />
col.IdentitySeed = ColumnToAdd.AutoIncrementSeed<br />
End If<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
''' Here is where i have problems<br />
''' Any Help in making this work would be greatly appreciated.<br />
''' I need this to Add key's(Primary and Index) if they are not there<br />
''' Delete it if it's not needed<br />
''' Or Change it if its needed<br />
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''<br />
Dim pkColumns() As DataColumn<br />
pkColumns = dt.PrimaryKey<br />
<br />
If pkColumns.Contains(ColumnToAdd) Or ColumnToAdd.Unique Then<br />
For Each i As Index In TableToUpdate.Indexes<br />
If Not i.IndexedColumns.Contains(ColumnToAdd.ColumnName) Then<br />
idx = New Index<br />
idx.Parent = TableToUpdate<br />
If pkColumns.Contains(ColumnToAdd) Then<br />
idx.Name = "PK_" & ColumnToAdd.ColumnName & "_" & dt.TableName<br />
idx.IndexKeyType = IndexKeyType.DriPrimaryKey<br />
Else<br />
idx.Name = "IDX_" & ColumnToAdd.ColumnName & "_" & dt.TableName<br />
idx.IndexKeyType = IndexKeyType.DriUniqueKey<br />
End If<br />
idx.IndexedColumns.Add(New IndexedColumn(idx, ColumnToAdd.ColumnName))<br />
UpdateNeeded = True<br />
End If<br />
Next<br />
Else<br />
If TableToUpdate.Indexes(0).IndexedColumns.Contains(ColumnToAdd.ColumnName) Then<br />
' Item exists but should not<br />
TableToUpdate.Indexes(0).IndexedColumns.Remove(ColumnToAdd.ColumnName)<br />
UpdateNeeded = True<br />
End If<br />
End If<br />
<br />
For Each p As Microsoft.SqlServer.Management.Smo.Property In col.Properties<br />
If Not p.Value.Equals(VerifyTable.Columns(ColumnToAdd.ColumnName).Properties(p.Name).Value) Then Return True<br />
Next<br />
Return UpdateNeeded<br />
<br />
End Function
Thank you
|
|
|
|
|
|
hello
i am using vb2008 and crystal report 11 and in database i am using sql server 2005 express edition, i want to call report and sub report using dataset
one more thing is i have more then one database in one crystal report like command and command_1 inboth main and sub report
thank you
ashish dudhatra
|
|
|
|
|
This will show you how to load logon info for each table and then set the databases in in each report.
I have also included code on how to send parameters to the report.
<pre>Dim rdReport As New ReportDocument
Dim LogInfo As CrystalDecisions.Shared.TableLogOnInfo
rdReport.Load("\\sysdatacenter\Public\Quality_Control\Reporting\" & reportName & ".rpt")
Dim crConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()
With crConnectionInfo
.ServerName = DataServer.Server
.DatabaseName = DataServer.Database
.UserID = DataServer.UserName
.Password = DataServer.Password
.IntegratedSecurity = DataServer.Security
End With
LogInfo = New CrystalDecisions.Shared.TableLogOnInfo
LogInfo.ConnectionInfo = crConnectionInfo
Dim crTable As Table
For i As Integer = 0 To rdReport.Subreports.Count - 1
For Each crTable In rdReport.Subreports(i).Database.Tables
crTable.ApplyLogOnInfo(LogInfo)
Next crTable
Next
For Each crTable In rdReport.Database.Tables
crTable.ApplyLogOnInfo(LogInfo)
Next
rdReport.Subreports("rptSettings").SetDataSource(dsReport.Tables("tblJobSettings"))
rdReport.SetDataSource(dsReport.Tables("tblSerialNumbers"))
For l As Integer = 0 To rdReport.ParameterFields.Count - 1
Select Case rdReport.ParameterFields(l).Name
Case "Company_Name"
rdReport.SetParameterValue("Company_Name", frmMain.ProgramDefault.CompanyName)
Case "Company_Address1"
rdReport.SetParameterValue("Company_Address1", frmMain.ProgramDefault.CompanyAddress1)
Case "Company_Address2"
rdReport.SetParameterValue("Company_Address2", frmMain.ProgramDefault.CompanyAddress2)
Case "Company_City"
rdReport.SetParameterValue("Company_City", frmMain.ProgramDefault.CompanyCity)
Case "Company_State"
rdReport.SetParameterValue("Company_State", frmMain.ProgramDefault.CompanyState)
Case "Company_Zip"
rdReport.SetParameterValue("Company_Zip", frmMain.ProgramDefault.CompanyZip)
Case "Company_Phone"
rdReport.SetParameterValue("Company_Phone", frmMain.ProgramDefault.CompanyPhone)
Case "Company_Fax"
rdReport.SetParameterValue("Company_Fax", frmMain.ProgramDefault.CompanyFax)
Case "Company_Web"
rdReport.SetParameterValue("Company_Web", frmMain.ProgramDefault.CompanyWeb)
End Select
Next
Me.crViewer.ReportSource = rdReport
Me.Cursor = Cursors.Default
modified on Friday, June 19, 2009 4:48 PM
|
|
|
|
|
Hi CP,
I am having an PictureBox and propertygrid . i am showing the image properties when i click the image in Propertygrid at runtime.
I selected one image through the property of PictureBox.
After selecting i mousedown ont the form.
I want to know whether the property( Image ) is having the focus or not .(BLUE COLOR ) NOT ( GREY )
How can i acheive this one ??
Regards ,
|
|
|
|
|
I am currently writing an application in VB.Net that requires me to deal with TIFF-JPEG Compression format, I have done some research on this and as far as I know GDI+ does not support this format. Does anyone know if there is a way around this problem either with or without a third party plug-in? Ideally I would like to avoid using third party plug-in if possible, but if not, can anyone recommend me a good third party plug-in that support this. I need to be able to do the follwoing:
1. Convert the TIFF-JPEG compression file into another format like bitmap or JPEG that GDI+ support.
2. The user will then be able to do whatever editing they need to do on the image (I have handled this part already).
3. Convert the edited image back into TIFF with JPEG compression format.
Any help or advise would be much appreciated, thanks in advance.
|
|
|
|
|
You do not have a choice. You must use a third party image library (not a plugin) to handle these types of images. GDI+ does not support them.
|
|
|
|
|
Agreed with Dave and the 3rd party approach would probably be the easiest to implement.
You might be able to "strip logic" out of a free program that has this functionality already. Maybe check into Paint.Net (not sure if the prog. is open source), but something like that. Check CodePlex as well.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi,
I have created a table in ms-access using VB.NET like below.
ADOXtable.Name = "ACN_CHARX_INSTANCE"
ADOXtable.Columns.Append("LOGICAL_DB_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("DIM_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("CHARX_NAME", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_TABLE", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_VALUE_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("VALUES_UNIQUE", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_ORDER_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_ORDER", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_NUMERIC_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("BITMAP_COL", ADOX.DataTypeEnum.adVarWChar, 128)
cat.Tables.Append(ADOXtable)
After that i gave a primary key like below,
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "LOGICAL_DB_NAME")
But now i want to add composite key for this table..I added the code like the below..
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "LOGICAL_DB_NAME", "DIM_NAME", "CHARX_NAME")
But after executing this code, the key is allocated for Logical_Db_name field only.
Please share your ideas about how to create composite key using VB.NET...
Thanks,
Sivakumar.M.
|
|
|
|
|
sivakumar.mariappan wrote: ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "LOGICAL_DB_NAME", "DIM_NAME", "CHARX_NAME")
Instead of putting all the column names in one line, I think you have to call Append again with the 2nd column, and again for the 3rd that you want to add as part of the key.
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "LOGICAL_DB_NAME")
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "DIM_NAME")
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "CHARX_NAME")
|
|
|
|
|
Thanks for your reply...if i give like below as u advised,
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "LOGICAL_DB_NAME")
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "DIM_NAME")
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "CHARX_NAME")
ADOXtable.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "CHARX_TABLE")
Exception raised...
{"Exception from HRESULT: 0x80040E99"}
Data: {System.Collections.ListDictionaryInternal}
ErrorCode: -2147217767
HelpLink: Nothing
InnerException: Nothing
Message: "Exception from HRESULT: 0x80040E99"
Source: "Interop.ADOX"
StackTrace: " at ADOX.Keys.Append(Object Item, KeyTypeEnum Type, Object Column, String RelatedTable, String RelatedColumn)
at IWSSample.IWSSample.CreateAccessDatabaseandtables(String DatabaseFullPath) in C:\LEGO\June19\IWSSample.vb:line 1021"
TargetSite: {System.Reflection.RuntimeMethodInfo}
Thanks,
Sivakumar.M.
|
|
|
|
|
Well, I didn't say I tested it. I said I think you may have to do something like that. Try reading the documentation on ADOX's Key.Append method. You may have to supply other information to the Append method, like foreign table names and columns.
|
|
|
|
|
Something like this?
key1 = New ADOX.key
key1.Name = "PrimaryKey"
key1.Type = ADOX.KeyTypeEnum.adKeyPrimary
key1.Columns.Append "LOGICAL_DB_NAME"
key1.Columns.Append "DIM_NAME"
key1.Columns.Append "CHARX_NAME"
ADOXtable.Keys.Append key1
Note the similarity with yesterdays index question - have a look at the ADOX object library.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Superb.....It is working fine now...Thanks a lot...
|
|
|
|