|
What do I have to do to make it work? I cannot change the program to 64bit.
|
|
|
|
|
If you've got a 64-bit version of Office installed, you can't install the 32-bit driver. There doesn't seem to be a sensible reason for this, but you'd have to ask Microsoft for a definitive answer.
Depending on the files you're reading, you might be able to get away with installing the Office 2007 version[^] of the driver, as suggested in this SO answer[^]. The 2007 drivers were 32-bit only, and shouldn't be blocked by the 64-bit version of Office 2010.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am currently working on a cbt software and i want the questions to be coming randomly ( one per page) which is working. Please how can i program Previous and Next button with WPF of VB.NET so user can skip and later go back before the exam finishes. Please help me. Have been on it for like 3 weeks now. thank you
|
|
|
|
|
At which point do you stuck ?
I think, at first you have to build up a kind of collection in which all Page-Contents are memorized, the selected answers and also the order of appearance.
After that you build up a Page, which has the 2 Buttons which increase or decrease the Collection-Pointer and which displays the Collection-Content at pointer-position.
|
|
|
|
|
I used a loop with total number of question a user can answer.. so when it clicks next. it gets incremented by one.. example Is a user can answer 10 questions and he is on number 7, he now moved back to question two, how do I program it to fetch what's on question two and when he is done , he won't see different questions from 4-7 he already did and also move on to complete the questions.. I am really struck there, please help me
|
|
|
|
|
As I have written before :
I would create a class which could memorize all the necessary information - for example the question-text, the given answer and so on (all what you think that you need).
Now you initialize your question-catalogue - each question is stored in this class-variable and the class is stored in the collection.
How much experience do you have with classes, collections, dynamic creation of classes ?
Could you imagine, what I tried to explain you ?
|
|
|
|
|
|
OK ... you understood what I have decribed ?
How should we go further ?
|
|
|
|
|
yes i do. we can go further with practical examples ( probably a simple sample code) or what do you think?
|
|
|
|
|
OK ... of course ...
I suggest that you create a class with the (from your point) necessary properties.
After that I need to know which Information out of your database should be stored for questioning.
Then we could fill the from me suggested collection with the new class-items which could be used (later) for your visualisation on the form.
It's your turn ...
|
|
|
|
|
yes i have created a class called "Bank"for the questions, it has the questions, options and correct answer, and its selecting per group (i.e. for a particular subject example English)
i have the properties as follows
public property questionNo as String
public property question as String
public property optionA as String
public property optionB as String
public property optionC as String
public property CorrectAnswer as String
|
|
|
|
|
OK ...
Now you should create the Collection for the Animation/Visualisation.
This could work like this :
dim QuestionCollection as new collection
Sub Initialize_Collection
QuestionCollection.clear
for i as integer = 1 to 10
dim myBank as new Bank
myBank.QuestionNo = ""
myBank.Question = ""
myBank.OptionA = ""
myBank.OptionB = ""
myBank.OptionC = ""
myBank.CorrectAnswer = ""
myBank.Result = false
your class
QuestionCollection.add (myBank)
next
End Sub
now you could work with this Collection on your Form.
With your Buttons you should select the index from the Collection-Entry and put the data of it to your Form-Labels/TextBoxes/OptionButtons etc.
Do you understand what I mean ?
|
|
|
|
|
Yes, i understood it a bit. like am creating a new List(of Collection) . and the loop means the user has 10 questions to answer, can you explain further please.. sorry for bothering you this much
|
|
|
|
|
NO ... if you want to do it with a List then you have to use a List (of Bank) - not of collection.
Either a collection or a generic List.
When you generate the List (or collection) you create severall instances of Bank (your class-definition). Each Instance should be filled with the needed data - for example the question-text and so on.
Please think a bit - some of the work should be done by you ...
|
|
|
|
|
i know right.. let me work more on myself, i would get back to you. thanks alot, i really appreciate. God bless you
|
|
|
|
|
No ... we could work together. That is no problem ...
But my wish was : TOGETHER ... and not me alone ...
So ... please show me your results and we could speak further ...
|
|
|
|
|
Hello !
Is there a way to save a large text as compressed in a sql server field ?
Thank you !
|
|
|
|
|
Compress it (zip), save it to a file (or binary stream), read file into a binary stream.
Write the data into a varbinary(MAX) field in the database.
You should understand about FILESTREAM as an alternative to storing the data in the database. You may also want to consider storing the file on a file server and storing only the file name in the database.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello !
I have a field on sql server database , Varchar(300)
From my vb.net program I want to insert in this field this text :
abc cde ght
1234 5678
567
The text should be saved on database as I wrote ( so in different lines ).
How should I format this text before saving to database ?
Thank you !
|
|
|
|
|
By using a SqlParameter[^] you can easily add multiline data in your DML statement. Use for example AddWithValue[^] method to add the parameter to your command.
Just a side note, your example data looks like you're going to add data into a single column which should be stored in separate columns/rows. But I hope it's just the example data...
|
|
|
|
|
Sorry , maybe you misunderstand.
I want to put all the 3 lines in a single field ( column )
for example :
myobject.mytext= " all the 3 lines that I wrote before"
|
|
|
|
|
satc wrote: I want to put all the 3 lines in a single field ( column )
Yes, and for that you create a single parameter which contains the value.
Consider the following (pseudo-code, not to be compiled)
command AS SqlCommand = new SqlCommand("INSERT INTO MyTable (Col1) VALUES (@colvalue)", connection)
command.Parameters.AddWithValue("@colvalue", "abc cde ght" & vbCrLf & _
"1234 5678" & vbCrLf & _
"567")
command.ExecuteNonQuery()
In the example above, a single row is created and a single value is inserted into column Col1 and it contains multiple lines.
|
|
|
|
|
Sorry , but I don't use pure SQL to send values to sql server.
I'm using Entity Framework , so I need to format those 3 lines in order to do something like this :
Myobject.Mytext=" ......"
I've tried to put vbcrlf at the end of ach line but doesn't work.
|
|
|
|
|
Entity Framework works in exactly the same way. If you've set your property correctly:
Myobject.Mytext = "abc cde ght" & vbCrLf & "1234 5678" & vbCrLf & "567"
then the value in SQL will include the line breaks. If you're not seeing the line breaks, then that's a problem with how the data is displayed.
For example, if you're looking at the value in the grid of query results in SQL Management Studio, the line breaks will be shown as two spaces. If you select the value, copy it, and paste it into a text editor, the line breaks will reappear.
If you're displaying the value in a markup language such as HTML, then you'll need to properly encode the output to see the line breaks. HTML ignores carriage returns, and requires a <br> tag instead.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I've used exactly the same line as you.
But after if I read this value from database , and put into a bound RichTextEdit the line breaks are missing.
|
|
|
|