|
When you create your table you can do something like this:
CREATE TABLE dbo.MyTable
(
MyUniqueColumn varchar(30) NULL UNIQUE NONCLUSTERED
)
|
|
|
|
|
how to read the long binary data from the MS ACCESS database? and storing in the another Document file.
|
|
|
|
|
Hello
How can i work with the Microsoft Multimedia Control (Version 6.0)
in vb.net?
More Info : you can add it to your form :
Tools-->Choose Toolbox Item--->COM and find it !
|
|
|
|
|
How do you generate lm and nt hashes using visual basic for a given password?
Radiit
|
|
|
|
|
Why? I'll give you a hint - it's an MD5 hash that is easily broken now-a-days. Other than that, I question the motivation behind asking such a question.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
gud morning frends,
Will anyone tell me what is the difference between Datagrid & datagridview in VB.nNet.
Thanks for any help in advance
-Regards Priyanka.
I AM NOT THE BEST
BUT I AM NOT LIKE REST
|
|
|
|
|
Differences Between the Windows Forms DataGridView and DataGrid Controls
The DataGridView control is a new control that replaces the DataGrid control. The DataGridView control provides numerous basic and advanced features that are missing in the DataGrid control. Additionally, the architecture of the DataGridView control makes it much easier to extend and customize than the DataGrid control.
The following table describes a few of the primary features available in the DataGridView control that are missing from the DataGrid control.
DataGridView control feature Description
Multiple column types
The DataGridView control provides more built-in column types than the DataGrid control. These column types meet the needs of most common scenarios, but are also easier to extend or replace than the column types in the DataGrid control. For more information, see Column Types in the Windows Forms DataGridView Control.
Multiple ways to display data
The DataGrid control is limited to displaying data from an external data source. The DataGridView control, however, can display unbound data stored in the control, data from a bound data source, or bound and unbound data together. You can also implement virtual mode in the DataGridView control to provide custom data management. For more information, see Data Display Modes in the Windows Forms DataGridView Control.
Multiple ways to customize the display of data
The DataGridView control provides many properties and events that enable you to specify how data is formatted and displayed. For example, you can change the appearance of cells, rows, and columns depending on the data they contain, or you can replace data of one data type with equivalent data of another type. For more information, see Data Formatting in the Windows Forms DataGridView Control.
Multiple options for changing cell, row, column, and header appearance and behavior
The DataGridView control enables you to work with individual grid components in numerous ways. For example, you can freeze rows and columns to prevent them from scrolling; hide rows, columns, and headers; change the way row, column, and header sizes are adjusted; change the way users make selections; and provide ToolTips and shortcut menus for individual cells, rows, and columns.
The DataGrid control is retained for backward compatibility and for special needs. For nearly all purposes, you should use the DataGridView control. The only feature that is available in the DataGrid control that is not available in the DataGridView control is the hierarchical display of information from two related tables in a single control. You must use two DataGridView controls to display information from two tables that are in a master/detail relationship.
Sathesh Pandian
|
|
|
|
|
Function SelectReportServiceAndDate(ByVal FromDt As Date, ByVal Todt As Date)
Try
'Myconnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=KanServicesDB.mdb;"
MyCommand.Connection = Myconnection
MyCommand.CommandText = "Select * from GKRST"
MyCommand.CommandType = CommandType.Text
MyDA.SelectCommand = MyCommand
MyDA.Fill(myDS, "GKRST1")
All.SetDataSource(myDS)
'All.RecordSelectionFormula = "{GKRST.Dttime}>=#" & Format(FromDt.Date, "mm/dd/yyyy") & "#"
All.RecordSelectionFormula = "{GKRST.DtTime}>=#" & Format(FromDt.Date, "M/dd/yyyy") & "# And {GKRST.DtTime}<=#" & Format(Todt.Date, "M/dd/yyyy") & "#"
'All.RecordSelectionFormula = "{GKRST.DtTime}>=#" & Now.AddDays(-1) & "# And {GKRST.DtTime}<=#" & Now & "#"
CrystalReportViewer1.ReportSource = All
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
Hi, I have a problem while selecting between two dates. In my database "Kanservices.mdb" have a Date Column like 'DtTime'. It has both date as well as time. The above code is select between two dates.Its not working properly. If i store the Date in the DtTime column its working. If i store Store Date&Time the problem occurs.
Plz give the solution.
Thanks & Regards
Kumaran
|
|
|
|
|
Two words: "Parameterized Queries".
If you try and concatenate strings together, like you are in this code, you have to worry about putting the strings together with the correct date format. Using parameterized queries, the Parameters objects take care of that for you! You don't have to worry about getting the format right!
You can find out more about them in Colin's article SQL Injection Attacks and Some Tips on How to Prevent Them[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
I need help in my VB application.
I have a 'Browse' button in my application's properties page, which should help me to browse through the directory system to choose a directory to save the xml files into.
How to I get the directory system when I click on browse.
In C# we have the 'FolderBrowserDialog' , do we have something like that in VB.
Also how do I save files into the directory choosen by 'browse'
|
|
|
|
|
yes. In vb.net we have the same 'FolderBrowserDialog'.
you can use it for the folder selection.
Sathesh Pandian
|
|
|
|
|
I am not using VB.NET. My application is in plain VB. it is VB 6.0 from Visual Studio 6.0..
I tried to convert it to Visual Studio 2005, but then there were many other issues seen while running the application.
Can you please help me with something in VB
|
|
|
|
|
k tell me.
what problems you are facing now?
Sathesh Pandian
|
|
|
|
|
This is an enhancement to the already existing project. I want to enter a directory path to save some files. I want the user the choose the directory. For this I have introduced the 'Browse' button in the code.
But I dont know how the directory structure will be seen on clicking on Browse.
I tried just entered this line of code
' Dim theFolderBrowser As New FolderBrowserDialog '
and executed the application.
But on clicking on 'Browse' it said the User-defined variable is not supported.
How can I have the dirctory structure visible. I am using plain VB
|
|
|
|
|
after that
you can try like this...
for VS 2005
if theFolderBrowser.showdialog= Windows.Forms.DialogResult.OK Then
filename=theFolderBrowser.filename
end if
For VS 2003
if theFolderBrowser.showdialog= DialogResult.OK Then
filename=theFolderBrowser.filename
end if
Sathesh Pandian
|
|
|
|
|
Thanx, I got the thing working
|
|
|
|
|
if you have any doubts, send your queries to me. i will surely help you.
Sathesh Pandian
|
|
|
|
|
I had another query
When I send the data to the server, the server forms an xml of the data and sends me the url to that xml.
Now, I am needed to save this xml into a particular directory(already known).
How to I read and save this file ?
I am not having a trace of the flow with me, so I dont have an idea how I will get the data in the xml and furthur will save it.
Can anyone help me to know how can I read the xml from the url to the xml and how do I save this file into a directory
|
|
|
|
|
you can try this
you know filename that is the url
you also know the directory path (savepath)
Dim xmlDoc As New XmlDocument
xmlDoc.Load(filename)
xmldoc.save(Savepath)
Sathesh Pandian
|
|
|
|
|
for the filename I will have to specify the whole path on the network system right ? I mean the xml will be on the server, so it will be
<serverip or="" name="">\<filepath>\<filename>
am I correct ?
|
|
|
|
|
is it physical path or virtual path?
if it is a valid path you can use tht link in the filename.
Sathesh Pandian
|
|
|
|
|
Sorry, What does a physical path or virtual path mean?
The server is expected to send something like 'www.server1.com\file.xml'
This is just an assumption, as we dont have the server implementation done and so cant get the actual packet trace.
|
|
|
|
|
ok you can use the load method like this
xmldoc.load("www.samples.com\1.xml")
no problem with this.
Sathesh Pandian
|
|
|
|
|
For better understanding, presently the server is responding with an URL pointing to the shopping cart which is then opened in the browser. These urls are in the form like
http://www.abc.com/
The application now wants the server to form xmls and send an URL pointing to the XML, back to the client.
I dont know how the client will get it back, I think it should be like
'www.server1.com\file.xml' or 'http://www.abc.com/file.xml'
Do you have any idea how it will be like. and Also the main point is that I should be able to save that xml file into the directory
|
|
|
|
|
For better understanding, presently the server is responding with an URL pointing to the shopping cart which is then opened in the browser. These urls are in the form like
http://www.abc.com/<some link="" to="" the="" page="">
The application now wants the server to form xmls and send an URL pointing to the XML, back to the client.
I dont know how the client will get it back, I think it should be like
'www.server1.com\file.xml' or 'http://www.abc.com/file.xml'
Do you have any idea how it will be like. and Also the main point is that I should be able to save that xml file into the directory
|
|
|
|