|
1) by chance is your sql server using a different port then what is the default? try adding the port to the data source 192.168.41.2,????? i've seen where my PC doesn't have to give the port but other pc's do...explain that...
2) if that's not the case, try setting up a temporary DSN and make sure the PC itself has no issue connecting to the database.
3) is the PC up to speed on MDAC versions
|
|
|
|
|
May i know anyone have any example of access database using vb6?? I am new to vb6 and when i look at vb6 book i found out that it is quite diff from .net. Please help...
|
|
|
|
|
Check out any book using classic ADO. If you know vb script for classic ASP pages, then apply that knowledge. Sorry can't be more specific but I haven't used VB 6 with Access for a few years.
|
|
|
|
|
What exactly are you trying to do with VB6/Access and find difficult?
|
|
|
|
|
cos when i look through the vb6 book. it is very different with .net. Their framework and syntax all different. i actually need to retrieve stuff from access and enter stuff in. Sumthing like staff record and information tracking.
|
|
|
|
|
If you look through the database chapters in that book, you will probably be able to get a few examples of interacting with Access, I think.
In any case, just Google for VB6 + Access, and you are likely to get a ton of stuff.
|
|
|
|
|
ya i know.. but the problem is my company got no internet..
|
|
|
|
|
Oh... tough luck...
How about the book then? Did you find a chapter on database access?
|
|
|
|
|
ya.. tt bk is database for vb6 but somehow i dun really understand... the recordset make me very blur...
|
|
|
|
|
The Recordset object basically contains a view from your query - the result of a Select statement.
If you use ADO, you can perform all SQL statements (Select, Insert, Update, Delete...) on the connection object referencing the Access database.
Why dont you just try out the example in the book, see how it works and post your doubts here?
|
|
|
|
|
okok.. thanks. cos now i doing attachment and tt is my project..
|
|
|
|
|
want to set focus on a row in gridview by typing on a column.
this should happen in a way that i move the focus on a column of the gridview and just type in a word and the focus should automatically be moved to the cell with the matching word.and yes by typing in a word doesn't mean i have to provide a textbox somewhere on the grid.all this essentially has to be for a windows forms.can anyone suggest me a solution for this
AMIT MORE(CMC)
|
|
|
|
|
Hi the community,
I'm searching and trying for a while the ability to create "live" variable names, but it seems to be impossible.
I explain my problem :
I've got buttons with a picture inside, and I load this picture at run time, by example :
btn_test.Image = My.Ressources.IMAGE_TEST
But what I'd like is to load a picture according to the content of a configuration text file (and then give the possibility to modify the "skin" of the application by changing the text file and/or the pictures).
When I parse my text file (an XML type file), I retrieve an ArrayList of ConfigurationValue objects, composed of a name and a value, either of String type.
What I can't find is the way to link the value to the name of the Ressource I have to use.
Please Help!
Ch'Portos.
Yop Yop !!
|
|
|
|
|
ChPortos wrote: What I can't find is the way to link the value to the name of the Ressource I have to use.
The My stuff is all shortcuts. It's actually loading the resource by name, and if you do that, too, you can use a variable to specify the name.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi guys,
Am having a bit of a problem. I would like to read data from an access table but only within a certain range.
to be more specific, its an accounting application and would like the balance to calculated from the last time i closed month to now.
The indicator for closing month is number
Squth
|
|
|
|
|
collo wrote: I would like to read data from an access table but only within a certain range.
Just create a query that runs against the certain range you want.
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
i have a problem for making excel file. please tell me how to make it, thanks.
|
|
|
|
|
There are many ways.
_Using OLE Automation
_Using thirst party component: Aspose, FarPoint...
_Make it yourself
|
|
|
|
|
not helpful at all
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Neither was the question...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Here is a simple app that takes a dataset and writes a worksheet per data table in the set
Public Sub writeToExcel(ByVal source As DataSet)
Dim doc As New System.IO.StreamWriter("Excel.xls") 'use .xls even though its an xml file
Dim startExcelXML As String = ""
startExcelXML &= "<xml version>"
startExcelXML &= vbNewLine & "<Workbook " + "xmlns=""urn:schemas-microsoft-com:office:spreadsheet"""
startExcelXML &= vbNewLine & Microsoft.VisualBasic.Chr(10) & "" + " xmlns =""urn:schemas-microsoft-com:office:office"""
startExcelXML &= vbNewLine & "xmlns:x=""urn:schemas- microsoft-com:office:" + "excel"""
startExcelXML &= vbNewLine & "xmlns:ss=""urn:schemas-microsoft-com:" + "office:spreadsheet"">"
'write the styles tags that format the data and cells properly
startExcelXML &= vbNewLine & "<Styles>"
startExcelXML &= vbNewLine & " <Style ss:ID=""Default"" ss:Name=""Normal"">"
startExcelXML &= vbNewLine & " <Alignment ss:Vertical=""Bottom""/>"
startExcelXML &= vbNewLine & " <Borders/>"
startExcelXML &= vbNewLine & " <Font/>"
startExcelXML &= vbNewLine & " <Interior/>"
startExcelXML &= vbNewLine & " <NumberFormat/>"
startExcelXML &= vbNewLine & " <Protection/>"
startExcelXML &= vbNewLine & " </Style>"
startExcelXML &= vbNewLine & "<Style ss:ID=""ColHeader"">"
startExcelXML &= vbNewLine & "<Alignment ss:Horizontal=""Center"" ss:Vertical=""Bottom""/>"
startExcelXML &= vbNewLine & "<Font x:Family=""Swiss"" ss:Size=""8"" ss:Bold=""1""/>"
startExcelXML &= vbNewLine & "<Interior ss:Color=""#C0C0C0"" ss:Pattern=""Solid""/>"
startExcelXML &= vbNewLine & "</Style>"
startExcelXML &= vbNewLine & " <Style ss:ID=""Reg"">"
startExcelXML &= vbNewLine & " <Font " + "x:Family=""Swiss"" ss:Bold""0""/>"
startExcelXML &= vbNewLine & " </Style>"
startExcelXML &= vbNewLine & "</Styles>"
'write the header to the file
doc.WriteLine(startExcelXML)
'write one sheet per table
For Each tab As DataTable In source.Tables
Dim sheetname As String = "<Worksheet ss:Name="
sheetname &= Microsoft.VisualBasic.Chr(34)
sheetname &= tab.TableName.Trim
sheetname &= Microsoft.VisualBasic.Chr(34)
sheetname &= ">"
doc.WriteLine(sheetname)
doc.WriteLine("<Table>")
'write the column headers
doc.WriteLine("<Row>")
For Each col As DataColumn In tab.Columns
doc.Write("<Cell ss:StyleID=""ColHeader""><Data ss:Type=""String"">")
doc.Write(col.ColumnName)
doc.WriteLine("</Data></Cell>")
Next
doc.WriteLine("</Row>")
'write the table
For Each row As DataRow In tab.Rows
doc.WriteLine("<Row>")
'Dim i As Integer
For i As Integer = 0 To tab.Columns.Count - 1
doc.Write("<Cell ss:StyleID=""Reg""><Data ss:Type=""String"">")
doc.Write(row.Item(i))
doc.WriteLine("</Data></Cell>")
Next
doc.WriteLine("</Row>")
Next
doc.WriteLine("</Table>")
doc.WriteLine("</Worksheet>")
Next
doc.WriteLine("</Workbook>")
doc.Close()
End Sub
this can be opened in excel. You will have to add your own formating to make the sheet look like you want, to do that just make changes, save it and open it and see what it did to the tags. Then make your code do the same.
Hope this helps
Kevin
-- modified at 9:55 Tuesday 28th November, 2006
|
|
|
|
|
Hey guys
I m reading from a text file (that contains data like the following)
What I want is to simply get the data between the bold lines-each block alone
Any hint for that?
A1/EXT "BK82 LB73 21233" 105 061018 1804
EXTERNAL ALARM
COOLING ALARM
A2
A1/POWER "BK82 LB73 21233" 362 061019 0947
EXTERNAL ALARM
EDL FAILURE KAA
A1
A1/POWER "BK82 LB73 21233" 364 061019 0947
.....
thx
Regards
Ramy
|
|
|
|
|
You need to read the whole file, and use a regex to find the lines that are in the format you want, assuming you can't rely on them being on the same lines.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
seems that i wasnt clear,
what i want is to read each block alone.(the sizes of the blocks are different)
i have hilighted the first line of each block in bold, in order to make myself clear..
Regards
Ramy
|
|
|
|
|
Do you mean you want to read only part of a text file, not the whole thing ? You can't do that. There are APIs that can make it look like you can, but the only way to find the bits you want, is to read the whole file, throwing away the bits you don't want. The easiest way is to read in the whole file and search it, it's also the most efficient.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|