|
I have taken a look and there is no such driver. I even contacted Zebra to see if I could modify the port name from "USB002" to COM, or even relocate the install, but no-go.
I'll try a different method.
Thank you for the help.
|
|
|
|
|
To print to a Zebra printer, you don't use the port; you just send a raw string directly to the printer.
Here's the C# class I use to do that: Raw printer helper · GitHub[^]
There's also a similar VB.NET version here on CodeProject: Print Direct To Windows Printer (EPOS Receipt)[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you, I will give this a shot, and let you know how it goes.
|
|
|
|
|
please there's this birthday app an developing and i want it to automatically send message to users at there birthday. please i need your help
|
|
|
|
|
|
Sure. How can we help you?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
In the code block below I am wishing to use a variable in a xxxx.Rows.Count line. Specifically, I'm wanting to take the "R1200s" portion and increment it to R1201s, R1202s, R1203s and so on as the For-Next loop executes.
I, of course, already have the DataTable()'s portion defined... no problem there. The code works fine if I write out every single instance but I'd like to shorten it up into a simpler block of code. I've been able to use "i" in every other control with success but getting hung up on only this portion.
I've tried something like ("R120" & i & "s"), along with many variations of this but, can find no solution that works with the limited experience I have with VbScript. Any help, a code example or a point in the right direction, is greatly appreciated.
For i = 1 To 8
Dim Ai As Label = DirectCast(Page.FindControl("A" & i.ToString()), Label)
Dim Si As Hyperlink = DirectCast(Page.FindControl("S" & i.ToString()), Hyperlink)
If R1200s.Rows.Count < Slots.Rows(0)(Ri).ToString() +1 Then
Ai.Style.Add("background-color","#000000")
Si.ImageUrl = "images/" & i & ".png"
Si.NavigateUrl = "step3.aspx?Time=" & i & "&Date=" & Request.QueryString("Date") & "&Day=" & Request.QueryString("Day") & "&Entry=" & Request.QueryString("Entry")
End If
Next
modified 24-May-17 2:20am.
|
|
|
|
|
|
What is R1200s? What type of object is it?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Have you tried
For i as integer = 0 to R1200s.Rows.Count-1
Next i
|
|
|
|
|
Hi,
I try to create an access 2007 or higher file.
I wrote this testcode just an simple form with 2 buttons.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnMake.Click
Dim dlg As New SaveFileDialog
With dlg
.Filter = "Access(.accdb)|.accdb"
If .ShowDialog = DialogResult.OK Then
Dim cat As New ADOX.Catalog()
Try
cat.Create("Provider=Microsoft.ACE.OLEDB.102.0;Data Source=" & .FileName & ";Persist Security Info=True")
'cat.Create("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" & .FileName)
Catch ex1 As Exception
MsgBox(ex1.Message)
If MsgBox("Is Microsoft Access Database Engine 2010 Redistributable installed?", vbQuestion Or MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Try
Process.Start("<a href="https://www.microsoft.com/en-us/download/details.aspx?id=13255">https://www.microsoft.com/en-us/download/details.aspx?id=13255</a>")<br />
MsgBox("Do it :)", MsgBoxStyle.SystemModal)
Catch ex2 As Exception
End Try
End If
Finally
cat = Nothing
End Try
End If
End With
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnOpen.Click
Dim dlg As New OpenFileDialog
With dlg
.Filter = "Access(.accdb)|.accdb"
If .ShowDialog = DialogResult.OK Then
Dim OLEConnection As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & .FileName & ";Persist Security Info=True")
OLEConnection.Open()
Dim OLECommand As New OleDb.OleDbCommand("", OLEConnection)
' Before this line you can create a string that holds your build for the table structure
Randomize()
Dim t As Int64 = Int(Rnd() * 100000)
Try
OLECommand.CommandText = "CREATE TABLE mytable" & t & " (field1 CHAR,field2 NUMBER)"
OLECommand.ExecuteNonQuery()
MsgBox("Table " & t & " maded")
OLECommand.CommandText = "insert into mytable" & t & " values(""" & t & """, " & t & ")"
OLECommand.ExecuteNonQuery()
OLECommand.Connection.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End With
End Sub
Create a table works. However making a file Always fails.
Can anyone gives me idaes?
I've tryed installing the 32 and 64 bit version of Microsoft Access Database Engine 2010 Redistributable
I'm working on a W10 machine 64bit
Jan
|
|
|
|
|
You are missing quite a bit of logic in creating the database. The sequence of events should be:
string connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0}", tbFilename.Text);
ADOX.Catalog cat = new ADOX.Catalog();
cat.Create(connectionString);
ADOX.Table adoxTable = new ADOX.Table();
adoxTable.Name = <table name here>
ADOX.DataTypeEnum dbType = <column data type>
adoxTable.Columns.Append(<column name>, dbType);
cat.Tables.Append(adoxTable);
ADODB.Connection con = cat.ActiveConnection as ADODB.Connection;
con.Close();
|
|
|
|
|
Thanks both for the help.
My sequence is the same as yours
Make file
add table
The difference is for making the tables: I use sql.
But it seems that making files won't work with framework 2.
Now with only changing to 4.52 it works
Jan
|
|
|
|
|
|
Hi - I use the Yahoo Finance API, to get Stock Quotes. The following code is showing a Status of 504. Does this mean that the service is discontinued or that the server is temporarily down? Can anybody suggest an alternative - where the function takes input of Ticker and Date, and gives output of Closing Price? Please ignore the error checks I am doing in the function below, since this is part of a larger macro and excuse the amateurish programming skills!
Public Function StockQuote(strTicker As String, Optional dtDate As Variant)
' Date is optional - if omitted, use today. If value is not a date, throw error.
If IsMissing(dtDate) Then
dtDate = Date
Else
If Not (IsDate(dtDate)) Then
StockQuote = CVErr(xlErrNum)
End If
End If
Dim dtPrevDate As Date
Dim strURL As String
Dim strCSV As String
Dim strRows() As String
Dim strColumns() As String
Dim dbClose As Double
dtPrevDate = dtDate - 7 'need a previous date cos of API Service
' Compile the request URL with start date and end date
strURL = "http://ichart.finance.yahoo.com/table.csv?s=" & strTicker & _
"&a=" & Month(dtPrevDate) - 1 & _
"&b=" & Day(dtPrevDate) & _
"&c=" & Year(dtPrevDate) & _
"&d=" & Month(dtDate) - 1 & _
"&e=" & Day(dtDate) & _
"&f=" & Year(dtDate) & _
"&g=d&ignore=.csv"
Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0")
http.Open "GET", strURL, False
http.Send
strCSV = http.responseText
' The most recent information is in row 2, just below the table headings.
' The price close is the 5th entry
If http.readystate = 4 Then
If http.Status = 200 Then
strRows() = Split(strCSV, Chr(10)) ' split the CSV into rows
strColumns = Split(strRows(1), ",") ' split the relevant row into columns. 1 means 2nd row, starting at index 0
dbClose = strColumns(4) ' 4 means: 5th position, starting at index 0
Else
dbClose = 0
GlobalErrorCount = GlobalErrorCount + 1
End If
Else
dbClose = 0
GlobalErrorCount = GlobalErrorCount + 1
End If
StockQuote = dbClose
Set http = Nothing
End Function
|
|
|
|
|
What this means is that the Yahoo servers did not get a response from the other service. You have less chance of fixing the problem at all, because it is in the hands of the network admins who are configuring the services at the back-end servers.
HTTP Status 504 - Stack Overflow
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
So admittedly I didn't write this code. I found it online and adjusted as I needed. We have been using this code to automatically create signatures and I have it running in several locations. Recently it has been failing to run on workstations in our office. They are all Windows 10 Pro, running office 2016 standard. The script runs fine on our terminal server which is server 2012 r2 with office 2016 standard.
Code fails seemingly at any line which contains objSelection.InlineShapes.AddPicture
If I comment out the first line containing that (line 124) the error happens on the next line containing it. Not sure if there was an update that broke this. Thanks for any help.
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strSignatureName = "default"
strLogoPath = "\\sersbs11\Common Shared Files\EMAILSIGS\seremailgraphic.jpg"
strGiven = objuser.givenName
strSurname = objuser.sn
strAddress1 = "6010 99 Street NW "
strAddress1EXT = objUser.postofficebox
strAddress2 = " Edmonton, AB "
strAddress3 = objuser.st
strPostcode = " T6E-3P2"
strExt = objuser.homephone
strTitle = objUser.title
strEmail =objuser.mail
strCompany = objUser.Company
strPhone = objUser.telephoneNumber
strFax = objUser.facsimileTelephoneNumber
strMobile = objuser.mobile
strDepartment = objUser.Department
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
objSelection.Style = "No Spacing"
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objselection.TypeText Chr(11)
Const Number_of_rows = 4
Const Number_of_columns = 1
Const END_OF_STORY = 1
objSelection.TypeParagraph()
Set objRange = objSelection.Range
objDoc.Tables.Add objRange, number_of_rows, number_of_columns
Set objTable = objDoc.Tables(1)
objTable.AutoFitBehavior(1)
Set objCell = objTable.Cell(1, 1)
Set objCellRange = objCell.Range
objSelection.Range = objCell.Range
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.Font.Bold = True
objSelection.Font.Color = RGB (0,127,127)
objSelection.TypeText strGiven & " " & strSurname
objSelection.Font.Size = 8
Rem objSelection.Font.Bold = False
objSelection.TypeText strDepartment & Chr(11)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 9
objSelection.Font.Bold = True
objSelection.Font.Color = RGB (121,121,121)
objSelection.TypeText strTitle & Chr(11)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 9
objSelection.Font.Bold = False
objSelection.Font.Color = RGB (121,121,121)
if len(strPhone) > 5 and len(strMobile) > 5 then
objSelection.TypeText strEmail & Chr(11) & "P. " & strPhone & Chr(11) & "M. " & strMobile
else if len(strPhone) >5 then
objSelection.TypeText strEmail & Chr(11) & "P. " & strPhone
else if len(strMobile) >5 then
objSelection.TypeText strEmail & Chr(11) & "M. " & strMobile
else
objSelection.TypeText strEmail
end if
end if
end if
Set objCell = objTable.Cell(2, 1)
Set objCellRange = objCell.Range
objCell.Select
objSelection.InlineShapes.AddPicture(strLogoPath)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 9
objSelection.Font.Bold = False
objSelection.Font.Color = RGB (0,127,127)
if len(strext) = 3 then
objSelection.TypeText Chr(11) & strAddress1 & Chr(149) & strAddress2 & Chr(149) & strPostcode & " " & Chr(149) & " " &_
"P. 780.435.2211 Ext: " & strext & " " & Chr(149) & " F. 780.437.4964 "
else
objSelection.TypeText Chr(11) & strAddress1 & Chr(149) & strAddress2 & Chr(149) & strPostcode & " " & Chr(149) & " " &_
"P. 780.435.2211 " & Chr(149) & " F. 780.437.4964 "
end if
Set objCell = objTable.Cell(3, 1)
Set objCellRange = objCell.Range
objCell.Select
PicFile0 = "\\sersbs11\Common Shared Files\EMAILSIGS\space.png"
PicFile1 = "\\sersbs11\Common Shared Files\EMAILSIGS\facebook.png"
LinkFile1 = "http://www.facebook.com/specialeventrentals"
PicFile2 = "\\sersbs11\Common Shared Files\EMAILSIGS\twitter.png"
LinkFile2 = "http://www.twitter.com/seredmonton"
PicFile3 = "\\sersbs11\Common Shared Files\EMAILSIGS\wordpress.png"
LinkFile3 = "http://blog.specialeventrentals.com"
PicFile4 = "\\sersbs11\Common Shared Files\EMAILSIGS\youtube.png"
LinkFile4 = "http://www.youtube.com/user/specialeventrentals"
PicFile5 = "\\sersbs11\Common Shared Files\EMAILSIGS\www.png"
LinkFile5 = "http://edmonton.specialeventrentals.com"
PicFile6 = "\\sersbs11\Common Shared Files\EMAILSIGS\pinterest.png"
LinkFile6 = "http://www.pinterest.com/seredmonton/boards/"
PicFile7 = "\\sersbs11\Common Shared Files\EMAILSIGS\linkedin.png"
LinkFile7 = "http://www.linkedin.com/company/special-event-rentals"
PicFile99 = "\\sersbs11\Common Shared Files\EMAILSIGS\seropenhouse.jpg"
Set objShape7 = objSelection.InlineShapes.AddPicture(PicFile5, True)
objDoc.Hyperlinks.Add objShape7.Range, LinkFile5
Set objShape1 = objSelection.InlineShapes.AddPicture(PicFile1, True)
objDoc.Hyperlinks.Add objShape1.Range, LinkFile1
Set objShape2 = objSelection.InlineShapes.AddPicture(PicFile2, True)
objDoc.Hyperlinks.Add objShape2.Range, LinkFile2 & Chr(11)
Set objShape3 = objSelection.InlineShapes.AddPicture(PicFile3, True)
objDoc.Hyperlinks.Add objShape3.Range, LinkFile3 & Chr(11)
Set objShape4 = objSelection.InlineShapes.AddPicture(PicFile4, True)
objDoc.Hyperlinks.Add objShape4.Range, LinkFile4 & Chr(11)
Set objShape5 = objSelection.InlineShapes.AddPicture(PicFile6, True)
objDoc.Hyperlinks.Add objShape5.Range, LinkFile6 & Chr(11)
Set objShape6 = objSelection.InlineShapes.AddPicture(PicFile7, True)
objDoc.Hyperlinks.Add objShape6.Range, LinkFile7 & Chr(11)
Set objCell = objTable.Cell(4, 1)
Set objCellRange = objCell.Range
objCell.Select
objSelection.InlineShapes.AddPicture(PicFile99)
Set objSelection = objDoc.Range()
objSignatureEntries.Add strSignatureName, objSelection
objSignatureObject.NewMessageSignature = strSignatureName
objSignatureObject.ReplyMessageSignature = strSignatureName
objDoc.Saved = True
objWord.Quit
|
|
|
|
|
Sounds like maybe a network problem. Check that the workstation can still access the remote files. Other than that you will need to do some detailed diagnostic investigation.
|
|
|
|
|
I have the same issue. I tried using a local file instead and get the same error.
In the event log it is showing that Word crashes
|
|
|
|
|
No idea why you are posting this message to me, on a thread that is more than two years old.
|
|
|
|
|
|
I wasn't; I just wondered what your message was supposed to be about, and why you posted it to me after such a long period of time.
|
|
|
|
|
I'm new to working with XML in VB.NET and would like a little help after tearing my hair out for a couple of days.
I have an XML file with the following structure:
-<conceptGrp>
-<descripGrp>
<descrip type="subjectField">6411, 6821</descrip>
</descripGrp>
-<languageGrp>
<language lang="DE" type="German"/>
-<termGrp>
<term>Scheren</term>
-<descripGrp>
<descrip type="termType">fullForm</descrip>
</descripGrp>
-<descripGrp>
<descrip type="reliabilityCode">3</descrip>
</descripGrp>
</termGrp>
</languageGrp>
-<languageGrp>
<language lang="EN" type="English"/>
-<termGrp>
<term>scissors</term>
-<descripGrp>
<descrip type="termType">fullForm</descrip>
</descripGrp>
-<descripGrp>
<descrip type="reliabilityCode">3</descrip>
</descripGrp>
</termGrp>
</languageGrp>
</conceptGrp>
First I need to cycle through all the elements in the file (>550000) and for each element extract the text
"6411, 6821" from
<descrip type="subjectField">6411, 6821</descrip>
and
"3" from
<descrip type="reliabilityCode">3</descrip>
The <descrpGrp> appears just once for each element.
The <languageGrp> appears at least twice but up to 20 times.
The <termGrp> appears mostly once but up to 10 times for each <languageGrp>.
The <descrpGrp> appears twice for each <termGrp>.
The <descrip type="reliabilityCode" ...> appears just once for each term.
Using the extracted strings I look them up and need to replace them with text in the element.
This is my code so far for getting the <descrip type="reliabilityCode">3</descrip>:
For Each conceptGrp In xDoc.Elements("conceptGrp")
For Each languageGrp In conceptGrp.Elements("languageGrp")
For Each termGrp In languageGrp.Elements("termGrp")
Dim code = termGrp.Element("reliabilityCode")
For Each descripGP In termGrp.Elements("descripGrp")
For Each descrip In descripGP.Elements("descrip")
Dim reliability As String = xDoc.selectSingleNode("/Categories/category[@descrip='reliability code']").InnerText
Next descrip
Next descripGP
Next termGrp
Next languageGrp
Next conceptGrp
When I look in the locals window I can see "descrip" and for the first node the property "next node" with the value I want but I just can't grab it.
How can I easily get the value and then replace it in the element with my looked up text?
Thanks
Ben
modified 17-May-17 20:17pm.
|
|
|
|
|
If Only You Knew The Power Of The Dark Side XPath!
|
|
|
|
|
Not at all a helpful answer, but thanks for taking the time to write something 
|
|
|
|