|
i am creating an .exe file in vb.net and running it on 64 bit but it is not running on 64bit the error is about database and one more thing is that am creating database with Ms-access.
How to create setup of MS-Access while creating .exe.
|
|
|
|
|
My guess is that you are using the Microsoft.Jet.OLEDB.4.0 provider to query the database. This does not have a 64 bit alternative, and so the solution is to make sure your application is compiled to run only in 32 bit mode. You can do this by going in to your application properties, then under the build tab, you must select x86 as your platform target, and recompile your app .
Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
I have developed a server application, and i used VB 6.0 but i try making it stand alone program which work but is not acessing my access database, what should i do for my program to access access
database after installing my application?
|
|
|
|
|
What have you done so far as to trying to connect to Access? Why use VB 6? It's been long dead, and why use Access, instead use SQL Server 2008 (full version or express, either depending on requirements)...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
well, paul is right about VB6.
you don't have to be up-to-date, but that thing is too outdated.
try this or this.
|
|
|
|
|
Continuing to slug through a VB6 to VS2008 conversion. In VB6 I was able to modify Access databases and add tables using a bit of code similar to the following (simplified for explanation)
<pre lang="vb">MyTableDef = MyDb.CreateTableDef(tblName)
' record type
For i = 1 To UBound(Fields)
MyField = MyTableDef.CreateField(Fields(i), FieldType(i), Size(i))
MyTableDef.Fields.Append(MyField)
Next
MyDb.TableDefs.Append(MyTableDef)
MyDb.Close()
Exit Sub
</pre>
Fields, FieldType and Size are arrays with a name, length and type of field to be created and appended.
I would like to duplicate this type of functionality using AD0 in VS2008. I know I can do it with a direct SQL command, but those could get real long and ugly. With this method I just add fields to an array and send them to this function.
Any suggestions?
Thanks in advance
|
|
|
|
|
If you absolutely must use the same functionality, add a reference to DAO. The TableDef and Fields objects are defined there.
|
|
|
|
|
Well the idea sounds good, but is difficult to accomplish.
I'm having trouble with someFolder, filePidl and extract.
I understand that someFolder is a IntPtr, that is passed in as null, and passed out as IntPtr, to use in the next line to reference as a ptr address in the buffer. But I don't understand how making my Interface does anything. I don't see a type in my interface or reference to type.
Then on filePidl, it's a IntPtr going in, but returns as a array of pointers.
extract is suppose to be a IntPtr, and come back pointing to an object.
Anyways, I can't figure out why I can't make the variables work, and the compiler complains about them. I don't know if it's my interface, or the code below.
Value of type IShellFolder cannot be converted to IntPtr.
Dim desktopFolder As IShellFolder = Nothing
Dim someFolder As IShellFolder = Nothing
Dim extract As IExtractImage = Nothing
'Get the parent folder IShellFolder
desktopFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, folderName, 0, pidl, 0)
desktopFolder.BindToObject(pidl, IntPtr.Zero, IID_IShellFolder, someFolder)
'Get the file's IExtractImage
someFolder.ParseDisplayName(IntPtr.Zero, IntPtr.Zero, shortFileName, 0, filePidl, 0)
someFolder.GetUIObjectOf(IntPtr.Zero, 1, filePidl, IID_IExtractImage, 0, extract)
modified 2-Jul-12 17:48pm.
|
|
|
|
|
jkirkerx wrote: and the compiler complains about them.
..what does the compiler say? Is it asking whether you're missing a reference?
If the compiler gives a hint, include it in the post
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I get this for the someFolder when in the BindToObject
Value of type 'Admin_PM_Standard.IShellFolder' cannot be converted to 'System.IntPtr'.
In one instance, I changed the interface function to
From
<PreserveSig()> _
Function BindToObject(
ByVal pidl As IntPtr,
ByVal pbc As IntPtr,
<MarshalAs(UnmanagedType.LPStruct)> ByRef riid As Guid,
ByRef ppv As IntPtr) As Int32
To
<PreserveSig()> _
Function BindToObject(
ByVal pidl As IntPtr,
ByVal pbc As IntPtr,
<MarshalAs(UnmanagedType.LPStruct)> ByRef riid As Guid,
ByRef ppv As IShellFolder) As Int32
And got the (System attempted to access memory that is protected) during debug. So I think I was on the right track and it worked, only it didn't like the Word 2007 Doc.
[IMPORTANT NOTE]
I should of mentioned this, I'm trying to use this in asp.net. I read that I could extract a thumbnail of an office document using the Shell32.Dll, post XP SP2. I'm starting to think that it is not possible, and that GetThumbnail replaced it, and that getThubmnail only works on image files.
This was an experiement, a chance to call a unmanaged DLL in managed code, to see if I can write something in c++ in the future, to use in my asp.net apps.
|
|
|
|
|
jkirkerx wrote: I should of mentioned this, I'm trying to use this in asp.net.
I really should take a look at that technology one day
jkirkerx wrote: <layer>I read that I could extract a thumbnail of an office document using the Shell32.Dll, post XP SP2. I'm starting to think that it is not possible, and that GetThumbnail replaced it, and that getThubmnail only works on image files.
Let's cheat a bit; I'll bet (another banana) that there are some articles on CodeProject that show how, and you probably have both an XP and a Win7 machine somewhere to test them. Use the example-downloads from the CodeProject-articles to extract the images and dump them in a database.
Then, from your ASP.NET application, consult that database.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I found some code articles that are very similar. I'll look again.
I just remembered, Sharepoint is a huge web app from Microsoft, that allows folks to share office documents. Sharpoint will create thumbnails of the documents, so the consumer can say, oh that one.
So the Shell32.Dll post SP2 made sense, thinking that Microsoft build in a mechanism for web apps like SharePoint to generate thumbnails of office documents, and now it's native in Server 2003 +
That's what justified the time to explore the thought.
I put this post in the VB discussion, because I thought the subject was way over the heads of the asp.net discussion.
I'm going to look into the out word, and give it another go, and do a little more research
|
|
|
|
|
jkirkerx wrote: That's what justified the time to explore the thought.
Even without justification, it sounded logical and rational. It does help, from the users point of view, if you have a picture to identify the format.
You'll find that different versions of Windows (and even Microsoft Office) generate different sets of icons. Saving it in a database creates an extra abstraction-layer, giving you a bit more control on the endresult.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
You need P/Invoke technology in order to call native code from .NET; and it can get a bit tricky. I wrote a little article on the subject, it might help you understand a few things about it: http://www.perceler.com/articles1.php?art=pinvoke1[^]
In ParseDisplayName the fifth parameter is a return value, so you should use the out (or ref) keyword, which tells the compiler to pass a pointer, not a value; and not to require a value when the method gets called.
The web site pinvoke.net holds valuable information about the P/Invoke prototypes you need; see e.g. here[^]
Warning: I did spot some errors on that site over the years...
You can't ignore compiler errors and warnings; take each of them seriously, and always start dealing with the very first error/warning you get; then work your way down the list, using whatever number of iterations it takes.
|
|
|
|
|
I saw the (out) declared in some s# code, and wondered how to use (out) in vb. I didn't think ByRef would do the job solely, and that was one of the compiler complaints, only worded different.
|
|
|
|
|
Recently I had to re-install Windows 7 Pro x64 on my PC. Now I'm trying to install VB6 and I'm having absolutely no luck and I'm not sure why. I didn't have any problems last time I installed it on my PC. When I run the Setup.exe program it will display a message telling me that the program has known compatibility issues and then I click the Run program button. After that nothing happens. After doing some searching I've tried running ACMSETUP.exe and ACMBOOT.exe. When I try that it asks me for my name and the CD key then it comes up with a message saying that I "must first run the installation wizard before running this setup". I found one place that said to try running regedit to apply the key.dat file that's in the root of the CD.
Thanks in advance.
Scott
|
|
|
|
|
|
Dave,
Before I posted my message I had already done the Google search you suggested and found the site you found you provided the link to and went there and I tried what it said but all to no avail. I spent half the night searching Google and trying different things. I already know that VB6 isn't supported in Windows 7 but, normally, it does work in Windows 7. Last time I installed it I had absolutely no problems getting it to install - the install ran without any problems. However, last night when I tried to install it, it wouldn't install. One thing I noticed when I looked at Forty Pound Head was that it says you should see ACMSETUP.exe running in the task manager. I had the task manager running and ACMSETUP.exe never started running. I'm wondering if the fact that I installed VS2010 before attempting to install VB6 could have something to do with the problems I'm experiencing. Anyone have any thoughts on that?
Thanks again in advance.
|
|
|
|
|
Installing VS 2010 first was probably your big mistake. You have to install VS6 first.
|
|
|
|
|
Somehow I had a feeling you were going to say that.
Thanks,
Scott
|
|
|
|
|
why not install it in a "virtual PC" win XP machine or even XP mode
it works fine there and no compatibility issues
it also makes it more portable if you upgrade PCs in future
|
|
|
|
|
Bonjour pour connecter à l'émulateur Googlemaps avec telnet ensuite geo fix latitude longitude ,j'ai programmer une interface VB6 pour le telnet OK mais geo fix ... ... non
URL:www.packupload.com/Y4OBL9VTMEC
|
|
|
|
|
En Anglais, s'il vous plait.
|
|
|
|
|
I'm messing around (experimenting) with some Flash Action Script Text file.
I want to read the file, and display it in html for a preview, sort of like a thumbnail view.
I tried File.ReadAllLines, but it stripped out all the tabs and linefeeds.
So I tried reading the stream, converting from bytes to chars. So now I have a string array of text lines in char form,
[Question]
I can detect &H9 for the tab in byte, but I'm not sure how to detect the char version of &H9 which shows up as ""c
[EDIT][Objective]
I want to do some formatting, in which I replace the tab with or something, and perhaps do some color coding for comments in green, and so forth for use on a web page.
Perhaps I should leave the text the way it is, and just use a richText object, which might accept the strings in the current form.
Dim asStream As FileStream = New FileStream(physicalPath, FileMode.Open, FileAccess.Read)
Dim asLen As Long = asStream.Length
Dim fileData As Byte() = New Byte(asLen) {}
asStream.Read(fileData, 0, asLen)
asStream.Close()
Dim byteLine() As Byte = New Byte() {}
Dim strArray() As String = New String() {}
For bdx As Integer = 0 To fileData.Length - 1
Dim byteVal As Byte = fileData(bdx)
If Not (byteVal = &HD) Then
Array.Resize(byteLine, byteLine.Length + 1)
byteLine(byteLine.Length - 1) = byteVal
Else
Array.Resize(byteLine, byteLine.Length + 1)
byteLine(byteLine.Length - 1) = byteVal
Dim charLine() As Char = New Char() {}
Array.Resize(charLine, byteLine.Length + 1)
For cdx As Integer = 0 To byteLine.Length - 1
charLine(cdx) = AsciiByteToChar(byteLine(cdx))
Next
Dim value As String = New String(charLine)
Array.Resize(strArray, strArray.Length + 1)
strArray(strArray.Length - 1) = value
Array.Resize(byteLine, 0)
bdx += 1
End If
Next
|
|
|
|
|
File.ReadAllText and ReadAllLines don't do anything to tabs. In fact the former does not change anything in the content, and the latter only treats carriage returns and line feeds in a special way. However the HTML language says consecutive spaces are reduced to one, and tabs tabulate to multiples of 8, so that is probably what you are seeing. The one exception would be inside PRE tags.
|
|
|
|
|