Search:
Type: Posts; User: keystone_paul
Search:
Search took 0.10 seconds.
-
When you deleted the first ' from the query you also deleted the space, therefore your SQL command will start with something like "SELECTMonday" rather than "SELECT Monday"
-
No you shouldn't have quotes around field names, just around strings.
You should also be using parameters in your query rather than just inserting values from your textbox.
-
I would strongly recommend setting Option Strict to on in your project settings. It may well throw up a number of errors immediately but once you've worked through them and corrected them your code...
-
That SQL query is not going to return a value based on the contents of the variable Night because you are enclosing it in quote so it is going to be treated as a string literal. For example assume...
-
Really?
These threads seem to suggest it works OK with SQL Express 2005. Like I say I don't use SQL Express but it looks like it should work.
...
-
You can download an ISO file which you'd need to burn to a CD or mount using a virtual drive program like MagicDrive.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express-iso
-
Its always helpful if you can say what the error(s) is.
However... the controls collection doesn't just contain labels so when your loop encounters a control that isn't a label what do you think...
-
You shouldn't even need to write a single line of code if you are have "Enable Application Framework" set in your project's properties (which it is by default)
If you go to your project's...
-
Not 100% sure for SQL Express but you can query on the value @@IDENTITY which should return the last auto-incremented identity, ie create a command with the command text
SELECT @@IDENTITY
And...
-
Row index is zero based so last row will be RowCount - 1
-
I think you need to give a little more information for anyone to be able to help.
-
The drawing and graphics system in .Net is entirely different to VB6. I'd say that trying to convert existing code line for line is not going to be an effective approach and you are better off trying...
-
I'm not a big user of the datagridview but my perspective would be that the control is a view onto the underlying data in the database, and therefore your suggestion in post #3 - create a record in...
-
This
If myDataReader.Read() Then
While myDataReader.Read()
is wrong also.. your IF statement will read the first record and you then immediately call Read again on the...
-
Why are you calling ExecuteNonQuery for a SELECT statement?
-
You need an UPDATE Query, not an INSERT. Check out http://www.w3schools.com/sql/sql_update.asp
You should also consider using parameters in your query rather than just appending values into the...
-
So... have you placed a breakpoint and stepped through your code?
-
OK so what appears to be happening in your verificare_locatie_baza_date routine is you open the connection and then you close it.
Then you call the verificare_disponibilitate_utilizatori routine...
-
Hmm... didn't spot the additional code you've posted.
-
Like I say - have you put in a breakpoint and stepped through your code to check that any of this is actually running?
I'm not sure why you call connectare_db twice in the sub...
-
Hmm.. I still don't see anything in the code you've posted that is attempting to ExecuteScalar against the connection. Can you indicate exactly where the code is breaking?
I assume you've tried...
-
The thing is.. if that path is invalid or the file doesn't exist, you'd expect it to raise an exception and trigger the Catch block and display the error form, which the OP doesn't suggest is...
-
I can't imagine that you get that error message in the code that you've posted as you aren't calling ExecuteScalar anywhere - I'm guessing that you're showing us the code that tries to open the...
-
OK take a look at the example below :
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'First box
Dim...
-
You can use the AddHandler method to hook up an event handler when you create the control.
Check out the MSDN or take a look at this example : http://www.thescarms.com/dotnet/EventHandler.aspx
-
You ought to be using parameterised queries for a number of reasons, including preventing SQL injection attacks, but it also helps prevent this kind of problem - you're getting mixed up with data...
-
Can you indicate which line of code you're getting the error on.
-
Presumably you've defined AllUsers and AllPasses as global variables as they aren't declared in your class (I hope you have Option Explicit on otherwise as per cicatrix's advice with Option Strict...
-
What I'm saying is having two things with an identical name in the same piece of code is A Bad Idea. The best outcome is that your code will be very confusing, the worst case is it won't work because...
-
Before you go any further you might want to look at your naming policy.
You have a local variable with the same name as the procedure. That's got to be a source of confusion even if not the error....
-
Well... I've fixed it but I don't understand why its fixed.
I've changed
Public Sub UpdateRegionTree()
tvwRegions.Nodes.Clear()
tvwRegions.Nodes.Add("Root", "The World",...
-
I'm pulling my hair out here - I must be doing something wrong but for the life of me I can't see what it is.
I have a treeview that is populated with a hierarchical list of regions and locations....
-
'SOkay - I figured it out.
A combination of the two approaches does the trick - using a DataTemplate to reference the user control.
-
Hi - Still new to WPF and trying to get my head round the proper way of doing things.
I want to create a listbox which displays a reasonably complex structure for each item. What I envisage is...
-
Very simple scenario : I have a user control which features a listbox, a textblock which reflects the selected item, and a button which should be enabled if there is a selection.
The relevant part...
-
Thanks jmcilhinney - that looks like it could be really useful. I've just had a quick play and I think it will make diagnosing issues a lot easier!
-
Sorted. Had the HierarchicalItemTemplate in the wrong place (wasnt within an ItemTemplate element)
I find WPF frustrating to debug - it seems that there is a lot less information fed back but I...
-
Thanks jmcilhinney - thats actually a page that I've been trying to get my head around. Perhaps its because thats in C# which I don't have so much experience with, but I can't seem to relate that to...
-
Hmm.. should you be using ODBC access or using the SDO interface? I work for Sage 50 R&D but not in the Accounts team but I'd have thought that you should be using Sage Data Objects and not ODBC....
-
Agree with pretty much all of whats said above.
I mention my history because in the days (up to VB5?) default instances were the way of doing things, and so if the OP goes back to those days like...
|
Click Here to Expand Forum to Full Width
|