|
I'm speculating that you'd have to enumerate the Running Object Table to find the instance you want. You'd have to P/Invoke the OLE32 library functions to do this, but it's possible. Take a look at this[^] article here on CP you'll find a similar example.
|
|
|
|
|
Thanks Dave I'll have a look into it
|
|
|
|
|
dsn creation code in vb.net
Dim str As String = ""
str = Application.StartupPath
If (str.Contains("\bin\Debug") = True) Then
str = str.Remove(str.LastIndexOf("\bin\Debug"))
End If
Dim Driver As String = "Microsoft Access Driver (*.MDB)"
Dim ireturn As Integer = 0
Dim Attributes As String = "DSN=" & "globizz "
Attributes = Attributes & "Uid=Admin " & "pwd=globizzdatabase"
Attributes = Attributes & " DBQ=" & str & "\data\dbGlobizz.mdb"
Attributes = "DSN=globizz Uid=Admin pwd=globizzdatabase DBQ=" + str & "\data\dbGlobizz.mdb"
ireturn = SQLConfigDataSource(0, 1, Driver, Attributes)
it is not creating the dsn
please help.
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: dsn creation code in vb.net
Dim str As String = ""
str = Application.StartupPath
If (str.Contains("\bin\Debug") = True) Then
str = str.Remove(str.LastIndexOf("\bin\Debug"))
End If
Dim Driver As String = "Microsoft Access Driver (*.MDB)"
Dim ireturn As Integer = 0
Dim Attributes As String = "DSN=" & "globizz "
Attributes = Attributes & "Uid=Admin " & "pwd=globizzdatabase"
Attributes = Attributes & " DBQ=" & str & "\data\dbGlobizz.mdb"
Attributes = "DSN=globizz Uid=Admin pwd=globizzdatabase DBQ=" + str & "\data\dbGlobizz.mdb"
ireturn = SQLConfigDataSource(0, 1, Driver, Attributes)
it is not creating the dsn
So far as I can see, this code creates only a connection string. The DSN globizz should already be configured in your system.
|
|
|
|
|
What do you want exactly? Are you trying to create through code or just trying to connect to database using the DSN?
|
|
|
|
|
|
sori i don't anything plz teaching me..i hope everyboy can help me in the vb.net / vb studio ... i want to study this....tq all nice to meet u all
|
|
|
|
|
Ever heard of books ...they are really great for learning...this isn't a classroom or an education centre, learning is your responsobility. If you have a problem with something you are learning then you come here and ask about it.
|
|
|
|
|
First and foremost two things:
1) Typo and Grammar
2) Properly phrased English sentence.
There are actually two totally misguiding words in your query.
freerhyme_2 wrote: sori
In Tamil, it means 'itching' and 'scratching' all over.
freerhyme_2 wrote: everyboy
Why is the help request gender-specific?
|
|
|
|
|
i'm sure sori was because he's lazy and everyboy was because he missed the d...
|
|
|
|
|
I'm building codes that provides monthly update on each member's subscription payment, but I don't know how to do this. Because, I'm afraid that if I run on the application each time, the member's balance will automatically accumulate everytime instead updated every month. I've thought to use like date update, like update on every last day of the month, but what if I don't run the application on that day?
Could anyone provide me any suggestion or idea, or sample code is the best, please?
Thank You Very Much. Ryan
|
|
|
|
|
Not sure exactly what you're doing, but you should be storing the date that a subscription is paid to, and then you can work out which subscriptions are due, either because they run out within a certain number of days, or they have run out.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm now doing code to load up a form, but I don't know how to load the dataset into combobox of each cell on the DataGridView and on the normal combobox. Could anyone tell me how, please?
Thank You Very Much for Your Helps. Ryan
|
|
|
|
|
Use the same binding source, what ever it may be, you used for the datagridview in the combobox.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
No, I'm not using the binding source or what on the GUI. Could you tell me what code should I use, please?
Thank You Very Much for Your Helps. Ryan
|
|
|
|
|
Dear freinds ,
I tried to generate test.txt , but I got stuck when I wanted to go for a new line in the text file.
Dim file1 As New FileStream("c:\test.txt", FileMode.Create)
Dim st1 As System.IO.StreamWriter
Dim b1 As Byte() = New UTF8Encoding().GetBytes("hi")
file1.Write(b1, 0, b1.Length)
file1.Close()
how can I go to a new line and then write somthing else. could anyone help me ?
Regards,
|
|
|
|
|
Just write a newline before you close the file. Nothing really much to it.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
Please try this:
...
Dim b1 As Byte() = New System.Text.UTF8Encoding().GetBytes("hi" & vbNewLine)
...
hope it helps
|
|
|
|
|
The proper, .NET way to do it, is to write Environment.NewLine. Really, it would make more sense to append that to your string, first. Either way, this code is a little messy. Why not just write it as text, why convert to a byte array ?
File.WriteAllText("c:\test.txt", "hi" & Environment.NewLine)
will do what you want, if you're in .NET 2.0.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
I’d be thankful to receive any information regarding the Drawing in VB.Net.
After I draw a line on form, when the form minimized or an other window comes over my form, every thing disappeare?
Thank you very much in advance.
I am looking forward to hearing from you soon
Thank you,
Reza
|
|
|
|
|
You should draw everything in the Paint handler
The Paint event gets fired whenever:
- something changed in the environment, e.g. your form got covered then uncovered
by something else
- the form's size changed (maybe minimize/restore, maximize/restore, regular resize)
- your code calls Invalidate()
So when your internal data changes and a repaint is needed, call Invalidate(),
dont paint things yourself outside the Paint handler.
|
|
|
|
|
You're obviously using CreateGraphics. What led you to do that ? It's totally wrong, and so many people seem to be doing it, I don't understand why.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I'm having a fit over here--most likely because I'm new to ReportViewer. I'm sure this must be pretty simple, but I've been banging my head against it for a couple hours and I'm hoping you can help. Available futzing time is EXTREMELY short on this one.
I have a single-record-display report, with no Table/Matrix controls--just TextBoxes, lines, etc. I need to send multiple records to the report and be able to navigate through them using the report's ToolBar buttons--First, previous, next, last.
Each button click should move to a different record and update that record's information in the TextBoxes. When the report is printed, a single page for each record should be produced.
Currently the ToolBar shows only one record, even though the report's underlying DataTable contains many.
Surely this must be possible?
Thanks!
-- modified at 0:55 Sunday 29th July, 2007
|
|
|
|
|
Why are you not using Table or Matrix controls? I've had this problem in the past and using a Table makes it go away :->
OT: I took the "U" word out of the subject line since it can upset people around here. I'd recommend modifying your subject line
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
> I took the "U" word out of the subject line since it can upset people around here
Oops, I didn't realize that! OK, I fixed it, thanks.
> Why are you not using Table or Matrix controls?
Er, maybe I'm missing something? If I use a Table/Matrix control, the data will display in tabular format on a single page of the report.
Maybe I didn't describe it too well. I'll try again.
I have 5 customers in a table. Each customer has a name, company and an account balance. I need a 5-page report with each page exactly the same except for the name, company and balance fields.
Like a mail merge. In fact, EXACTLY like a mail merge.
Thanks
|
|
|
|