AutoIncrement Column Strange Behavior On .mdb Files?
Aug 1, 2010
After a successfull bindingsource.AddNew(), .EndEdit(), TableAdapter.Update(), i'm trying to get the value of the PrimaryKey from the newlly added record wich is always = -1!
Private Sub BtnNewClient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnNewClient.Click
If BtnNewClient.Tag = "New" Then
SetClientLayout(ClientLayouts.CLNew)
Me.ClientsBindingSource1.AddNew()
[code]....
View 3 Replies
ADVERTISEMENT
Mar 2, 2009
I have a simple datagridview that I fill from a mysql database using the latest mysql connector.net.I configured my columns in the datagridview collection and the data displays fine.I don't want the user to edit data directly in the grid so my datagridview is not readonly but all my columns are except the checkbox one. If I set the datagridview readonly I can't check my checkboxes.I added a checkbox column to be able to delete multiple rows easily but I can't uncheck a checkbox.
Let's say I have 3 rows in my datagridview I check line 1 checkbox- I check line 2 checkbox- I uncheck line 1 checkbox- I check line 3 checkbox As soon as I check line 3 checkbox, line 1 checkbox becomes checked "automagically"
[Code]...
View 4 Replies
Dec 1, 2009
I have a VB 2008 program that has a number of forms. When I run the compiled program on a different computer, the form appears different. The relative position of various controls on the form are different. Its as if the controls have been repositioned. Resizing the form does not correct the problem. The only difference between the two machines is the size and resolution of the screens.
View 4 Replies
Jun 10, 2009
i have simple application which contain one listbox.i am loading item in listbox from one file. around 130000 items in it.when i run this application on xp computer i am able to scroll down all item perfectly from first to end.But when i run this application on vista machine, it only shows 50% of item if i scroll down with that bar on right on listbox. but when i reach end of list (which is item number 65000) and than use "Down arrow " of listbox it move to item n umber 65001 and later and scroll bar move again center of listbox.After i move to record number 65001 and more by clicking down arrow and use scroll bar at center to move further down to end it again shows 65000 item.
View 1 Replies
May 16, 2012
I develop my VS2010 project in my laptop with SQL 2008 Standard. In my laptop everything is working good, using the following connect string as global public string when the main form loads:
[Code]...
View 12 Replies
Nov 28, 2011
I have an Access 2007 database with a column defined as AutoIncrement. I need to remove the definition while I programitically load data into the database and then re-add it when I'm done. I've unsuccessfully tried the following code, but get an error: "Exception from HRESULT: 0x800A0CC1" I'm using the following code to try to remove the attribute:
Dim cn As New ADODB.Connection
Dim cat As New ADOX.Catalog
Dim objTable As New ADOX.Table()
Dim objField As New ADOX.Column
[code]....
View 3 Replies
Mar 24, 2012
I have an ms-access database called db.mdb and it contains various table. I;m creating a Account Creation page with ASP.NET and VB.NET.I'm trying to input fields within the page into ms-acess db but when I open the db there are no values entered despite web develop not showing any errors.
[Code]...
View 1 Replies
Mar 2, 2011
MS-Access Database
Table: myTable
Field1: ID (COUNTER, which is autoincrement in Access)
Field2: SURNAME (VARCHAR)
Field3: NAME (VARCHAR)
I want to get ID returned, whenever I insert a row. Is there a way? (I am using VB.Net)
EDIT: Solution using SELECT @@IDENTITY
'Execute insert statement and return identity (autoincrement ID field)
Public Function executeInsertGetIdentity(ByVal insertStatement As String) As Integer
' Execute insert
[Code]....
View 1 Replies
Sep 28, 2011
I have many files at work that need to be copied from one directory to another. However, I do not need to copy all the files at once.
I get excel sheets with the list of files that need to be copied once a week. So, in the main directory there is about 150.000 files and I only need to copy about 800 at a time.
I am thinking of having a textbox and an open dialog so I can pick the directory the main files are at - another one where I can choose where they will be copied to.
The problem is the list will be in excel sheet (column A). How do I have vb.net (2008) see the file names in column A and find them and move them?
Right now, I have macros in excel doing the job, however, I have so many things in this excel I need to transfer this part out and into vb.net.
The macro in excel doing the job is:
Code:
Sub CopyFiles()
Dim objFSO As FileSystemObject
Dim strSourceFolder As String
[Code]....
View 2 Replies
Mar 26, 2011
well i am populating a listview with some entries from an explorer tree, but i want to create a multi-column listview in which column 1 holds
the name of files added by me and column 2 hold locations of the corresponding file.
View 3 Replies
Aug 11, 2011
Module Module1 Public Declare Function GET_CALCULATION_FAN_ALONE Lib "EbmPapstFan.dll" (ByRef path As String) As Long Private Declare Function GET_PRODUCTS Lib "ebmpapstfan.dll" (ByRef path As String) As Long Public Declare Function SET_XML_PATH Lib "EbmPapstFan.dll" (ByRef path As String) As Long
[Code]...
View 2 Replies
Mar 15, 2010
I'm exporting a table of data to CSV format, e.g.:
"COL1","COL2","COL3"
"1","some text", "£232.00"
"2","some more text", "£111.00"
"3","other text", "£2.00"
The code to export is fairly simple using an ashx handler:
[Code]...
My issue is when Excel tries to open the exported file the character appears before all £ signs, e.g. £232.00 when the value should be £232.00.
View 1 Replies
Jul 14, 2011
Question: How does the class for the serialization of this XML content look ?
<?xml version="1.0" encoding="utf-8"?>
<vcc:CreateTextSearchResponse xmlns:vcc="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0">
[code]....
View 2 Replies
Jun 15, 2011
I have a bit of a strange problem with MySQL that I've never seen before. Basically, I need to enter the same entry into a table x number of times. The Primary Key is auto increment so there shouldn't be any duplicate value problems. However, it takes the last few columns and seems to clump them all into one value and is using that as a key. The error I'm getting back is:Duplicate entry '80-0--2011-06-16-0-1' for key 'idx_mtind you, there is no field called idx_mt. The primary key field is called just ID. And that 80-0--2011-06-16-0-1 is the last 8 columns or so (which you can see the names of in the cols variable) concatenated, which they obviously shouldn't be doing. Also, the first time the loop runs through, the entry goes through, but the later ones conflict with it. I confirmed that this is the problem by changing one of the last 8 columns to a value based on a loop, and that went through with no problems.
Dim cols As String = ""
Dim msi As System.Globalization.DateTimeFormatInfo = New System.Globalization.DateTimeFormatInfo()
[code]...
View 1 Replies
Oct 13, 2010
i am working on an application which calls the COM component of a partner's application.Ours is .Net, theirs isn't. I don't know much about COM; I know that the component we're calling is late-bound i.e.obj As Object = CreateObject("THIRDPARTY.ThirdPartyObject")We then call a method on this COM object (Option Strict Off in the head of the VB file):obj.AMethod(ByVal Arg1 As Integer, ByVal Arg2 As Integer, ByVal Arg3 as Boolean)I am a bit nonplussed that even though this call works, this overload doesn't exist in the COM interop .dll that is created if I instead add a reference to the COM server using Add Reference. The only available call to this method that it says is available is AMethod().
View 3 Replies
Mar 8, 2011
this one has me stumped - problem is bolded
Compiler Error Message: BC30456: 'Login1_Authenticate' is not a member of 'ASP.login_aspx'
<asp:LoginView ID="LoginView1" runat="server">
<LoggedInTemplate>
[code].....
View 6 Replies
Jan 15, 2010
ok I have a form.. has too much.. so I want to now use tab controlin VB6 I would delete then paste the object into the tab control andI recall it worked ok..with vs08 I cut and paste and looks ok.. but doesnt work..lets say I had button btnInstall when I paste it over its that name.. butwhen I click on it now.. it goes to btninstallButton_Click_1why did it put the _1 on there ? I didnt copy and paste .. I cut..
View 6 Replies
May 29, 2009
I got kind a mystery situation. There's not a lot of code, only few lines but the point is that it only works partially (it saves but does not load).
I tested it with another cmbbox1, which makes it work on seperate cmbboxes but not on either one or onother on their owns.[code..]
I got other cmbBoxes with titles on them loaded from the DB and they work fully, only this one doesn't.what should I look at?
View 15 Replies
Jun 28, 2011
I want to supress a key for a textbox: [code]this is working, B key is supressed,but adding just a messagebox will not work..[code]
View 1 Replies
Mar 14, 2012
I am trying to make a very simple aspx page that pulls some data from a mysql database.
The page builds without a problem. (the aspx contains just the default form and a div just to print some data)
[Code]....
View 1 Replies
May 23, 2011
I�m using Outlook to automatically send an email to my mobile phone. To bypass the stupid "security" bug in outlook I use redemption.safemailitem.Now, this has worked for years, but for some reason I can�t change the adress to which outlook sends the mail. Instead of sending to the adress in the code, it sends to an old adress that�s not anywhere in the code (but it was, ages ago)
View 6 Replies
Jun 24, 2008
It seems to be the general consensus from most places I have looked that the following code
Code:
Dns.GetHostEntry(Dns.GetHostName).AddressList()
Is the correct method of getting the local IP address of a machine, and when run against
[code]....
View 5 Replies
Apr 13, 2011
I cretaed a vb application where I concatenate a string to build XML code and Im getting an error stating that I must include a matching PURCHASE-ORDER-SHIP-TO end tag which clearly exists see below:
sMyXml = sMyXml + " <PURCHASE-ORDER-SHIP-TO>" sMyXml = sMyXml + " <DIRECT-QUESTIONS-TO>ATHOS PETROU</DIRECT-QUESTIONS-TO>" sMyXml = sMyXml + " <address:ADDRESS xmlns:address=""http://www.removed"">" sMyXml = sMyXml + " <address:NAME-LINE-1>Addr1</address:NAME-LINE-1>" sMyXml = sMyXml + " <address:NAME-LINE-2></address:NAME-LINE-2>"
[Code]...
View 3 Replies
Mar 14, 2012
I have a problem with strange character.
In mysql this character 💀 cause error Incorrect string value: 'xF0x9Fx92x80'
Samples of these characters are from [URL]
Say I want to analyze data from the web and found some strange character
how to remove this character 💀 ??
The occurance is rare.
In fact, how to know all characters that may be problematic for mysql and remove that? I am not saying escapeable characers. I am saying characters that are neither numeric, alphabeth, or chinese scripts, or punctuation. Characters that's totally bizarre.
How do I get rid of that from a string?
View 1 Replies
Jul 26, 2008
Its a Program i created to Sync PSP with my PC (like psp manager)you browse through titles (images) add/remove/sync options plus aconnectivity test but when i start the "Sync.exe" VB Studio 2008 saysthat theres a problem with this code:
Dim Bypass
Dim Value As Short
Bypass = FreeFile()
[code].....
View 7 Replies
Aug 22, 2009
I am having a strange issue when using the StreamWriter where I am getting some strange charachers in my text file when reading data from a query string.
[Code]...
View 3 Replies
Feb 17, 2011
Why when I wrote in a xml the char "&" it appears & ??
View 3 Replies
Oct 23, 2010
I am working on a program that takes 12 numbers that the user inputs and calculates the total and average but every time I run it it comes out to be like 6.5 and numbers like that.
' Store the starting values in total and count.
sngTotal = 0
intCount = 1
[code].....
View 2 Replies
May 31, 2012
i'm using lineInput to read a text file but get a problem with a certain record.it shows [code]I've changed the encoding to utf8, ansi, ... but nothing helps. Anybody an idea what could be the cause?It only does this with the first record in the file.
View 3 Replies
Feb 20, 2009
I'm developing with VB.NET 2008.One of my host was crashed, so I take the files and keep development on another host. But now something strange is happening:All frames, lines and shapes are disappeared on design-time, but are seen normally in runtime.
[Code]...
View 1 Replies