ChrisPadgham 113 Posting Whiz
BitBlt commented: Very true, good point. +8
ChrisPadgham 113 Posting Whiz
dim TwoDArray(10,10) as Int16
There are some things that lock the whole database, recordcount not being one of them, relinking of tables, drop tables etc. Perhaps the recordcount is a red herring and not the cause of this problem.
it looks very much like an third party library, go to add-ins menu and click Add-in Manager, see if you can find something that looks like this to add to the project.
you need to think about what vb is parsing, it is processing the " not passing them in and you are not concatenating your strings.
txt = "<test name=" &chr(34) & "My Name is Rick" & chr(34) & " value=" & chr(34) & "False" & chr(34) & "/>"
i think line 13 should be
cmd.commandText = strCommandText & Values
a web app is accessed through a browser, a window application is a stand alone program that runs on the PC
is it not simpler to us the isnumeric function
I don't think peek is the correct method, you should something like
.readline
or
.readalltext
also your code is processing 3 rows and 2 cols but your data is 2 rows and 3 cols
The most robust way is to import the data into a staging table, each column in the staging table is text 255.
Do your validation there before inserting the data into the product table.
Alternatively you could open the excel spreadsheet as an embedded object and work through it cell by cell validating as you go.
Have you tried stepping through it in debugger, set a break point at the spot it is adding the "0" on the front and check out what is wrong with your logic
or
instead of
f &= ZeroPad(line, 7) & vbCrLf
use the format function
f &= line.format("0000000")
Make it the Primary Key then set it to autoincrement and the database will assign an id for you, no need to worry about it in the code.
myquotedstring = chr$(34) & "My name is Rick" & chr$(34)
The jet engine is single threaded so if one process is holding a lock everything else will wait. It is quite OK where there is not a great number of concurrent users but it becomes problematic with the number of concurrent users rises.
probably something in cloud technology would be good, it is quite hot at the moment
isn't your SQL wrong, shouldn't it be
INSERT INTO empinfo (empname) VALUES ("???")
you will need to concatenate in the actual emp name instead of the ???
I know this is not what you asked but if you just want to check if it is a valid date then you can use the isdate() function.
hmmm not really fully normalised though. How many Min/Max power combinations could you have? not that many I would have thought.
If you are going down this path, why would you not just store the price rather than the Bracket id in the Wiring table. then you would not need to join the other table at all
Can a purchase order have more than one product on it.
if not, put a foreign key (ContractId) in the tblPurchaseOrder table.
if so, put a foreign key (ContractId) in the tblPurchaseOrderLine table.
Well for a start you will need a relationship between Employee and User if they are not the same thing. Can you have users who are not employees, if not dump the User table and store the UserId and Password in the Employee table.
The Bill will not only require a total but be itemised, accordingly you should have another table with
BillItems(BillId, ItemNo, Description, Amount)
Can I question why you want to take a screen shot. Presumably the data on the screen is derived from information stored on the webserver, why not just build a report of that data and email that.
If you have not written C before then I think you will find VB easier and faster
AND will only return one record if there is only one record matching the where clause. If you have multiple rows that match you will get multiple rows back, for example if your table holds the following data
FLD1 | FLD2 | FLD3
XXX | 111 | A
XXX | 111 | B
XXX | 222 | B
and your where clause is
WHERE FLD1='XXX' AND FLD2='111'
then you will have two rows returned
Yes since incident has a many-to-one relationship with student you need a separate table to hold incidents (probably called something like "Incident"). Personally I prefer an autonumber field as a primary key of the Incident table, say IncidentNo.
StudentId should be included in the Incident table as a foreign key.
Possibly the simplest solution then is to install a serial port (RS232) on your PC
Otherwise check if the supplier has provided an API or ActiveX control than you can use to talk to the device
This is not really a database design discussion group,
Yes you can do all the interface in VB and there are tons of examples of connecting VB to databases on the site.
wrt the data model, have a go yourself first. You need to think about what data you will need to store, ie what information about a customer, what information about a bank account and what information about a transaction. Then think about how they will link together (ie the relationships between these three entities)
Once you have that, go into MSAccess and try creating some tables to hold this data.
in the bottom example shouldn't you be using the alias sndPlaySoundA in your call
no it took ages for me to work out what the problem was.
check out the string.replace method. eg
newstring = imagem_box.Text.replace("\","\\")
I haven't tested it, (don't have a .net environment with me at the moment)
I had a similar problem coding in MS Access you might like to try using two slashes on the input i.e.
f:\\pap\\siteimages\\curso\\drum.jpg
you can put it in manually first to test, then if that is the problem, change your code to insert the second slash programmatically
I presume the image path is stored in the field imagem_box.Text
are you saying that when you execute the insert command the data in column imagem_curso does not contain the forward slashes
At the stage you are at, you need to focus on develop the data model (database design) for your application, the programming will come later.
Think about what data you want to store and a relational data model that could be used to represent that data.
The Val function returns the numeric value of a character string. therefore on line 25 the value of the 4th argument will be 0 not "Assembly Design"
The PC I have with me has 2010 on it but I think it is the same in 2007.
On the ribbon bar at the top, click the External data tab, you will see XML, click that and follow the wizard you should be OK
you don't need any expensive converters, which version of access are you using
if it access it will be .md?
Have a look in the folder that it is installed in. See what files are in there, in windows explorer look at the type column and see what types of files they are, just from the description of the type you might be able to pick the file.
Also if they have been using it for a while and there is a lot of data in it it will probably big quite a big file so sort on the file size by clicking on the column header.
The simplest outcome would be if it was a MS Access database but that might be too much to hope for.
another approach is to compare to a formatted string something like
format$(tranDate,"mmm-yyyy") = "jan-2012"
Have you thought about breaking up the form into a number of smaller forms and containing them all in a parent form.
on what row are you getting the error
This is one of the most obvious applications for the use of recursion but it is not really for the faint hearted. As WaltP says this needs some design however in simple terms you write a subroutine that takes a folder as an argument.
the code in this subroutine processes all the objects within the folder. when it encounters a sub-folder it calls itself to process that subfolder.
When the subroutine finishes processing every object in the folder it simply returns.
The EXE you are refering to is the program executable I presume. You will need to create an installation EXE that packages up all the files you want to distribute. Installshield seems to be the product of choice for this purpose these days
Check whether maximizer uses a relational database to store its data, if it does you may simply be able to link the tables in you database to extract the data.
Actually in Access 2002 I think you will need to use * as your wildcard not %
As mentioned above by autocrat you first need to establish your data model. Probably something simple with two tables the first containing a list of phone functions and a description field. The second table contains two columns, the first is a list of keywords you want to search on and the second is the phone function to which the keyword relates.
Then put a text box on a form that allows the person to enter a search string, a button for the user to click to perform the search and a list box to display the results of the search.
The rowsource of the listbox will be something like
SELECT Key_Word, Phone_Function FROM tblKeyWords WHERE Key_Word='*" & text1.text & "*'"
under the button click event put
List1.requery
Nice piece of code, I could have used this a number of times, and will from now on.
I think you need a new entity called something like Roster that contains WardNo, Nurse, Date
Also since it is a hospital you probably need shift in there as well since there will be at least 2 shifts per day and obviously the supervisor needs to be on the same shift as the nurse
check out the datediff function I think you will find it does what you need
I had a look at that website, it looks like a many-to-many relationship in which case you will need a links table to normalise it.
The table can be simple with two columns one for parent rowid and child row id. When you are displaying the child records you do a join on this table to the child rowid and filtering on the parent rowid.
I am not sure you need a links table for such a simple structure.
Ensure each row has a unique id, include a column named something like parentId to hold the id of the parent record.
values is a string, try replacing it on line 10 by subsum and delete line 12
Also I don't think you need to convert to an integer. If you are only expecting relatively small integers in the list box why not use integers the whole way through rather than doubles.
Tuition = myCommand.ExecuteScalar.ToString