|
Several pcs that have the same Software application (VB.NET) all using Access on one server. This is multi-user. This happens in mainframe (CICS) and also in pcs.
silver-gray
|
|
|
|
|
Each PC will run its own instance/instances of the app. It's up to you as the developer to provide the app the ability to communicate with the database on the server. Using Access as a database is a real pain (and it's also limited to a 2GB file size), and as such I'd recommend using SQL Server.
Also, ADO.NET uses a disconnected data object model in that the app does not persist any connection to the database - it connects, retrieves data & disconnects. This allows your apps to be far more scalable however, concurrency of records then becomes an issue.
Learning ADO.NET[^]
Introduction to Data Concurrency in ADO.NET[^]
|
|
|
|
|
when printing in vb.net, i can prevent my application from showing this little form, which says 'generating document, preparing page 1 for printing" (or whatever it says) by using a new printcontroller:
<br />
PrintDocument1.printController= new Printing.StandardprintController<br />
but when i use printpreviewdialog or printpreviewcontrol to show the preview, the little form appears again. How can i prevent that?
|
|
|
|
|
using vb.net (2002) to read data from a binary file written by a legacy vb6 application (that I have the code for).
The data is of various types and is held in a structure.
I've simplified it below
Private Type QuoteInfo
sngCashOption As Single
... other variables of other types ...
strName as String
strAddress as string
End Type
Private muQuote As QuoteInfo
muQuote is then filled with data and then saved thus:
Open strFileName For Random As iFileNo Len = 500 ' Len(muQuote)
Put #iFileNo, miRECORD_NO, muQuote
Close iFileNo
Now the types aren't the same in vb6 and .NET - I've had to change Long in to Int32 and so on, but my problem is with strings
My .NET for reading it is:
Private Structure QuoteInfo
Public sngCashOption As Single
... other variables of other types ...
Public strName as String
Public strAddress as string
End Structure
Dim qi As New QuoteInfo()
Dim fs As FileStream = File.Open("filename", FileMode.Open)
Dim binRead As New BinaryReader(fs)
qi.sngCashOption = binRead.ReadSingle
... other variables of other types ...
qi.strName = binRead.ReadString
qi.strAddress = binRead.ReadString
And I get an 'System.IO.EndOfStreamException' when I try and read the second string. Any ideas? I guess strings are held differently.
Any ideas?
Thanks in Advance - Ben
|
|
|
|
|
Almost all of my textboxes in my application I am building have a waitcursor property and when I try to change it, I click on the Ibeam selection but it doesnt change. The waitcursor remains. I tried changing it in code on my FormLoad event and this didnt work. There are some textboxes that do not have this issue but MOST of them do which makes this even more wierd. And also if I make a new textbox it will by default have the Ibeam property but when I compile and put my cursor over it, it has the WaitCursor!!!!!! I have spoken with several other programmers in the building and none can figure out what to do about this. I am just trying to find someone who has had a similar problem and fixed it or someone who has an alternate idea of what I can do about this (besides Re-installing VS). I am using Visual Studio 2005. Thank you in advance for your responses...
|
|
|
|
|
I've never seen the problem. You might want to check the designer generated code to see if it has been specified somehow. Other than that, I've never even heard of someone having this problem.
Are you creating the textboxes on another thread maybe? (Just grasping at straws here...)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for the help.... I am new to vb.net 2005 and I cannot seem to figure out how to view the designer generated code. It isnt in the code view like it is in .net 2003. Is there a way to toggle the form generated code visible and not???
|
|
|
|
|
There's an icon in the Solution Explorer window that is labeled (hover the mouse of each icon) "Show All Files". I think it's the second one from the left side. Each form file will then get a little plus next to it. It think you can figure it out from there...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
There is a property in the property windows on the form designer called (UseWaitCursor) and this was set to true on most of my group boxes AND textboxes and is the reason why this was happening. I dont understand what this property is for when there is ALSO a cursor property... Anyway, its fixed so YAY for me!!!
Thanks for the help tho, have a good one...
|
|
|
|
|
Have you checked the cursor setting of the parents of the controls?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Is it possible to display the recent files in a combobox in the same way windows does it when you go to open a file. If you start typing text a dropdown is displayed with files that match the text being entered.
|
|
|
|
|
If you're trying to do this in your own ComboBox list, outside of a standard OpenFileDialog, then you'll have to write all the code that keeps track of which folder the user is in and get the list of files in that folder so you have something to populate the ComboBox with as the user types. Is this what you're doing?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
hi,
can somebody help me out?i have vb2005 and sql server table. i created an odbc.i want to display all the table data in a datagridview. the below code is not working. is there any property to set?
Dim con As New Odbc.OdbcConnection
Dim da As New Odbc.OdbcDataAdapter
Dim CB As New Odbc.OdbcCommandBuilder(da)
Dim ds As New DataSet
con.ConnectionString = "dsn=alphasql"
con.Open()
da.SelectCommand = New OdbcCommand("Select * from Company", con)
da.Fill(ds, "Company")
DataGridView1.DataSource = ds
|
|
|
|
|
since you are dealing with a dataset, you have the possibility of having multiple tables in the dataset so you have to tell the datagrid which table you want.
datagrdview1.datamember=ds.tables(0).tablename (or if you know the name give it)
to make the datagrid actually load the data. you need to run "Refresh()"
datagrdview1.refresh()
|
|
|
|
|
thank you very much.its working now
|
|
|
|
|
Hi,
I created a panel named "panel1" in a main form, and I tried to add one of child forms named "childForm1" to the panel by:
" panel1.controls.add(childForm1) "
but errors occured: "Top-level control cannot be added to a control."
Can I load other forms in a windows form ? , and how ?
Thank you very much
kaiwnyt
|
|
|
|
|
It's in C# so you got to convert to VB.
form is your form to be put in panel.
if(form != null)
{
form.ControlBox = false;
form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
form.Dock = DockStyle.Fill;
form.MaximizeBox = false;
form.MinimizeBox = false;
form.TopLevel = false;
panelTop.Controls.Add(form);
form.Show();
form.BringToFront();
}
else
{
panelTop.Controls.Clear();
}
|
|
|
|
|
Thanks DarkElv and Yone Low very much !
Main Form: Mainform
Child Form: Form1
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form1.ControlBox = False
Form1.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Form1.Dock = DockStyle.Fill
Form1.MaximizeBox = False
Form1.MinimizeBox = False
Form1.TopLevel = False
Panel1.Controls.Add(Form1)
Form1.Show()
Form1.BringToFront()
End Sub
kaiwnyt
|
|
|
|
|
Yes you can!
for some reason Microsoft decided not to include the property in the designer, but it does indeed exist. see the code below.
Dim frm2 As New Form2
frm2.TopLevel = False
Panel1.Controls.Add(frm2)
frm2.Show()
|
|
|
|
|
Thanks
|
|
|
|
|
Hi,
My problem is that, due to large data in SQL server, my Inventry software is getting to slow while loading data from the server, is there any solution from the database side to increase the performance, or i have to change the entire code of the software, which is going to be the worst thing to do, as i have written the code in VB, I have used distributed Database Access Layer to access the data from the database.
|
|
|
|
|
Maybe you may to consider not displaying all the inventory at one go. Let the user choose the category/level or whatever or filter the list by inventory code or name, ie user type in 'A*' in name filter box and your system only shows the inventory with name started with 'A'.
|
|
|
|
|
Hi,
First of all thanks for the solution, but the problem is that i am already using filters in my software for loading the data,i am using "for loop" to append new row in the datagrid, which takes lot of time, please suggest me other solution using which i can speed up my loading data process.
|
|
|
|
|