|
I'm going to go out on a limb and assume that you have three tables:
emp:
emp_no - PK
emp_name
etc.
pc:
pc_no - PK
etc.
emp_pc:
emp_no - FK to emp.emp_no
pc_no - FK to pc.pc_no, unique
The primary key on emp_pc would be (emp_no, pc_no), you would also create a unique index on pc_no (because a pc can only be assigned to one employee)
Cheers,
Jason Lepack
|
|
|
|
|
I need to read 4 hexadecimal chars from a textbox and put them into a Uint
how can I do that?
BiG RaLpH
|
|
|
|
|
Don't cross post in multiple forums. It's unecessary and make it difficult for people to collaborate on an answer.
|
|
|
|
|
i have been messing with vb for about 3 months now and i am trying to find the code to where you can click browse and you can search you pc for the file you want then it loads the file to a datagrid, i have tried my own code and alot of others form the net but all give build errors and i cant seen to fix them.
can someone please link me to or tell me the cod that allows you to search for certain files and load them to a data grid.
-Chris
|
|
|
|
|
FreakNikon wrote: have been messing with vb for about 3 months now and i am trying to find the code to where you can click browse and you can search you pc for the file you want then it loads the file to a datagrid
What kind of file you are trying to display in the Datagrid? Datagrid is for displaying the records from a database. You can use Dataset for this purpose. Or you can also display a CSV file in the datagrid.
AliAmjad(MCP)
|
|
|
|
|
well lets say im trying to load a text fie into a datagrid. what would i put to load the file into the datagrid
|
|
|
|
|
I was wondering if this was possible....i know i can use a VB Variable in javascript using <%= strRandom %>. But it doesn't seem as easy to pass a javascript variable to a VB variable.
|
|
|
|
|
You can't. They are two entirely different runtimes that don't know anything about each other and provide no methods for communication between them. What you're doing in your code example is actually replacing the <%...%> tag with the value of the variable in the HTML. The Java code doesn't even know VBScript exists.
|
|
|
|
|
Yeah, I just used a hidden object to store the value and take it from that.
But thanks for the reply
|
|
|
|
|
I have a question... I have a datagrid populated with a large list of information. I have a text box above the datagrid and i want it to be possible for the user to click inside the textbox and type a letter and the list jumps to the row on the datagrid beginning with that letter. As the user continues typing in letters it brings matches up to the item on the list that most closly matches what is being typed.
The way I have it now is that the user can type in a word and it finds that row in the datagrid. I want it to match up to the letter. any clues?
This code is what i have now...it finds the item by number or acronym typed in the text box but you have to type in the whole number or acronym...not just one letter.
Private Sub txtSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSearch.TextChanged<br />
Dim intItemFound As Integer<br />
This will search the programlist for whatever the user is inputting in the textbox<br />
If Me.rbAcronym.Checked = True Then<br />
intItemFound = Me.m_bndProgramList.Find("REVISION_ACRONYM", txtSearch.Text)<br />
Me.m_bndProgramList.Position = intItemFound<br />
ElseIf Me.rbNumber.Checked = True Then<br />
intItemFound = Me.m_bndProgramList.Find("BASE_PROGRAM_NUMBER", txtSearch.Text)<br />
Me.m_bndProgramList.Position = intItemFound<br />
End If
Erica
|
|
|
|
|
The Find method doesn't support wildcards and will match onlt the entire search string, case-insensitive.
If you want to narrow down what the user sees, then you can use the Filter property of the BindingSource and use something like:
Me.m_bndProgramList.Filter = String.Format("REVISION_ACRONYM LIKE '{0}%'", txtSearch.Text)
This will return all of the records that have a value in the REVISION... column that starts with the text entered in the TextBox.
|
|
|
|
|
thank you soooooo much. Now it does exactly what I want...YAY
Erica
|
|
|
|
|
I have a series of windows that have windows inside and I wish to lock them together so if the outer window is expanded the inner window will follow.
|
|
|
|
|
Handle the Resize event of the outer window. In there, calculate the new size of the child windows appropriately for your situation and set the Size property of the child windows.
|
|
|
|
|
Do you have an example of this.....
|
|
|
|
|
Dude, seriously?
Look, I remember being a beginner too but when someone tells you what to do you really need to have the where with all to go figure it out form there.
If we do it for you then you will not learn anything.
|
|
|
|
|
Hi,
how can i generate a gant-chart in microsfot visio 2007?
i will import data from a ms sql server and generate a gant-chart in visio.
thx 4 help
Robert
thx Robert
|
|
|
|
|
Not sure how, but if you find a way, share it with everyone
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
HI all,
I want to declare dyanaic arrays.How can I. I am trying like this but it is giving error ?
Dim Names() As String
Sub New(ByVal st As List(Of String))
st.CopyTo(Names) <-- value cannot be null error
End Sub
How to solve this
Thanks in Advance
Dana
|
|
|
|
|
I believe your problem is you haven't created your Names array yet.
So I think your code should be something like:
Dim Names() As String
Sub New(ByVal st As List(Of String))
if Names is nothing then
Names = new String(st.Length)
end if
st.CopyTo(Names) <-- value cannot be null error
End Sub
Anyway, hopefully you get the idea.
Ben
|
|
|
|
|
Thanks Ben,
But it is giving RunTime Error.Becuse these method (Names = new String(st.Length)) is not supported in Vb.net
Dana
|
|
|
|
|
Ok try this:
private Names As String()
Sub New(ByVal st As List(Of String))
st.CopyTo(Names) <-- value cannot be null error
End Sub
Ben
|
|
|
|
|
It doesn't work because the Names array doesn't have any elements in it. If you delcared the array as:
Dim Names(10) As String
it would contain 11 elements of type String, all with the value of String.Empty.
The way you've done it, there are no elements in the array. You'd have to ReDim the array to the proper size, then call CopyTo
Sub New(ByVal st As List(Of String))
ReDim Names(st.Count - 1)
st.CopyTo(Names)
End Sub
But, I highly recommend changing the array to a List.
Private _names As List(Of String)
Public Sub New(ByVal st As List(Of String))
_names.AddRange(st)
End Sub
|
|
|
|
|
Thanks Dave.....
It worked well
Dana
|
|
|
|
|
I'v created a report in visual studio using crystal reports.
And everything works fine as long as I test it on a machine wich visual studio installed.
Otherwise I get a error and the prog closes.
Ok so I went and googled this problem and found out that I need to install 'crystal reports for .net' onto the test machine.
The problem I have now is I can't find a download for this.
On the site of business objects I'v found information about this but it doesn't tell me wether or not I need to buy something or if it's a free download, or were I can download it.
http://www.businessobjects.com/products/reporting/crystalreports/net/vsnet.asp[^]
does anyone know if I need to buy one of there products and so wich one. The embedded crystal reports in visual studio is suficiant for me so all I need now is to be able to deploy it to another machine.
thanks in advance
-- modified at 9:00 Friday 26th October, 2007
[SOLUTION]
after a long search I'v found a possible solution
adding a merge module to my setup project appears to have solved the problem
since I had to search a very long time to find it here is a link in case anyone has the same problem:
http://support.businessobjects.com/downloads/merge_modules.asp[^]
the downside to this solution is that every time you install the programme this module is installed aswel (wich takes a bit longer) also the programmes size increases alot and the build time voor the setup project is alot longer.
But it works
-- modified at 9:03 Friday 26th October, 2007
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|